-
Notifications
You must be signed in to change notification settings - Fork 415
/
Copy pathpostgresql.keywords.ts
152 lines (151 loc) · 5.06 KB
/
postgresql.keywords.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
export const keywords: string[] = [
// https://www.postgresql.org/docs/14/sql-keywords-appendix.html
'ALL', // reserved
'ANALYSE', // reserved
'ANALYZE', // reserved
'AND', // reserved
'ANY', // reserved
'AS', // reserved, requires AS
'ASC', // reserved
'ASYMMETRIC', // reserved
'AUTHORIZATION', // reserved (can be function or type)
'BETWEEN', // (cannot be function or type)
'BINARY', // reserved (can be function or type)
'BOTH', // reserved
'CASE', // reserved
'CAST', // reserved
'CHECK', // reserved
'COLLATE', // reserved
'COLLATION', // reserved (can be function or type)
'COLUMN', // reserved
'CONCURRENTLY', // reserved (can be function or type)
'CONSTRAINT', // reserved
'CREATE', // reserved, requires AS
'CROSS', // reserved (can be function or type)
'CURRENT_CATALOG', // reserved
'CURRENT_DATE', // reserved
'CURRENT_ROLE', // reserved
'CURRENT_SCHEMA', // reserved (can be function or type)
'CURRENT_TIME', // reserved
'CURRENT_TIMESTAMP', // reserved
'CURRENT_USER', // reserved
'DAY', // requires AS
'DEFAULT', // reserved
'DEFERRABLE', // reserved
'DESC', // reserved
'DISTINCT', // reserved
'DO', // reserved
'ELSE', // reserved
'END', // reserved
'EXCEPT', // reserved, requires AS
'EXISTS', // (cannot be function or type)
'FALSE', // reserved
'FETCH', // reserved, requires AS
'FILTER', // requires AS
'FOR', // reserved, requires AS
'FOREIGN', // reserved
'FREEZE', // reserved (can be function or type)
'FROM', // reserved, requires AS
'FULL', // reserved (can be function or type)
'GRANT', // reserved, requires AS
'GROUP', // reserved, requires AS
'HAVING', // reserved, requires AS
'HOUR', // requires AS
'ILIKE', // reserved (can be function or type)
'IN', // reserved
'INITIALLY', // reserved
'INNER', // reserved (can be function or type)
'INOUT', // (cannot be function or type)
'INTERSECT', // reserved, requires AS
'INTO', // reserved, requires AS
'IS', // reserved (can be function or type)
'ISNULL', // reserved (can be function or type), requires AS
'JOIN', // reserved (can be function or type)
'LATERAL', // reserved
'LEADING', // reserved
'LEFT', // reserved (can be function or type)
'LIKE', // reserved (can be function or type)
'LIMIT', // reserved, requires AS
'LOCALTIME', // reserved
'LOCALTIMESTAMP', // reserved
'MINUTE', // requires AS
'MONTH', // requires AS
'NATURAL', // reserved (can be function or type)
'NOT', // reserved
'NOTNULL', // reserved (can be function or type), requires AS
'NULL', // reserved
'NULLIF', // (cannot be function or type)
'OFFSET', // reserved, requires AS
'ON', // reserved, requires AS
'ONLY', // reserved
'OR', // reserved
'ORDER', // reserved, requires AS
'OUT', // (cannot be function or type)
'OUTER', // reserved (can be function or type)
'OVER', // requires AS
'OVERLAPS', // reserved (can be function or type), requires AS
'PLACING', // reserved
'PRIMARY', // reserved
'REFERENCES', // reserved
'RETURNING', // reserved, requires AS
'RIGHT', // reserved (can be function or type)
'ROW', // (cannot be function or type)
'SECOND', // requires AS
'SELECT', // reserved
'SESSION_USER', // reserved
'SIMILAR', // reserved (can be function or type)
'SOME', // reserved
'SYMMETRIC', // reserved
'TABLE', // reserved
'TABLESAMPLE', // reserved (can be function or type)
'THEN', // reserved
'TO', // reserved, requires AS
'TRAILING', // reserved
'TRUE', // reserved
'UNION', // reserved, requires AS
'UNIQUE', // reserved
'USER', // reserved
'USING', // reserved
'VALUES', // (cannot be function or type)
'VARIADIC', // reserved
'VERBOSE', // reserved (can be function or type)
'WHEN', // reserved
'WHERE', // reserved, requires AS
'WINDOW', // reserved, requires AS
'WITH', // reserved, requires AS
'WITHIN', // requires AS
'WITHOUT', // requires AS
'YEAR', // requires AS
];
export const dataTypes: string[] = [
// https://www.postgresql.org/docs/current/datatype.html
'ARRAY', // reserved, requires AS
'BIGINT', // (cannot be function or type)
'BIT', // (cannot be function or type)
'BIT VARYING',
'BOOL', // (cannot be function or type)
'BOOLEAN', // (cannot be function or type)
'CHAR', // (cannot be function or type), requires AS
'CHARACTER', // (cannot be function or type), requires AS
'CHARACTER VARYING',
'DECIMAL', // (cannot be function or type)
'DEC', // (cannot be function or type)
'DOUBLE',
'ENUM',
'FLOAT', // (cannot be function or type)
'INT', // (cannot be function or type)
'INTEGER', // (cannot be function or type)
'INTERVAL', // (cannot be function or type)
'NCHAR', // (cannot be function or type)
'NUMERIC', // (cannot be function or type)
'PRECISION', // (cannot be function or type), requires AS
'REAL', // (cannot be function or type)
'SMALLINT', // (cannot be function or type)
'TEXT',
'TIME', // (cannot be function or type)
'TIMESTAMP', // (cannot be function or type)
'TIMESTAMPTZ', // (cannot be function or type)
'VARCHAR', // (cannot be function or type)
'XML',
'ZONE',
];