-
Notifications
You must be signed in to change notification settings - Fork 636
Commit d38c2d0
Add PostgreSQL
Currently, the library only supports `CREATE ROLE` and `ALTER ROLE` for
PostgreSQL. `CREATE USER` and `ALTER USER` fail to parse with errors
like `"Expected: an object type after CREATE, found: USER"`
But in PostgreSQL reference:
- `CREATE USER` is equivalent to `CREATE ROLE`, except that `LOGIN` is assumed by default
- `ALTER USER` is an alias to `ALTER ROLE`
- Both should support the same options as their ROLE counterparts
This commit extends the existing `CreateRole` and `AlterRole`
structures to distinct which keyword has been used: `USER` or
`ROLE`. It allows these expressions to be parsed and displayed back.CREATE USER
and ALTER USER
support1 parent 779dcf9 commit d38c2d0
File tree
6 files changed
+215
-5
lines changed- src
- ast
- parser
- tests
6 files changed
+215
-5
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
34 | + | ||
35 | + | ||
36 | + | ||
37 | + | ||
38 | + | ||
39 | + | ||
40 | + | ||
41 | + | ||
42 | + | ||
43 | + | ||
44 | + | ||
45 | + | ||
46 | + | ||
47 | + | ||
48 | + | ||
49 | + | ||
50 | + | ||
51 | + | ||
52 | + | ||
53 | + | ||
34 | 54 |
| |
35 | 55 |
| |
36 | 56 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
55 | 55 |
| |
56 | 56 |
| |
57 | 57 |
| |
58 | - | ||
58 | + | ||
59 | 59 |
| |
60 | 60 |
| |
61 | 61 |
| |
| |||
3314 | 3314 |
| |
3315 | 3315 |
| |
3316 | 3316 |
| |
3317 | + | ||
3318 | + | ||
3317 | 3319 |
| |
3318 | 3320 |
| |
3319 | 3321 |
| |
| |||
3421 | 3423 |
| |
3422 | 3424 |
| |
3423 | 3425 |
| |
3426 | + | ||
3427 | + | ||
3424 | 3428 |
| |
3425 | 3429 |
| |
3426 | 3430 |
| |
| |||
5279 | 5283 |
| |
5280 | 5284 |
| |
5281 | 5285 |
| |
5286 | + | ||
5282 | 5287 |
| |
5283 | 5288 |
| |
5284 | 5289 |
| |
| |||
5298 | 5303 |
| |
5299 | 5304 |
| |
5300 | 5305 |
| |
5301 | - | ||
5306 | + | ||
5302 | 5307 |
| |
5303 | 5308 |
| |
5304 | 5309 |
| |
| |||
5337 | 5342 |
| |
5338 | 5343 |
| |
5339 | 5344 |
| |
5345 | + | ||
5340 | 5346 |
| |
5341 | 5347 |
| |
5342 | 5348 |
| |
| |||
5506 | 5512 |
| |
5507 | 5513 |
| |
5508 | 5514 |
| |
5509 | - | ||
5510 | - | ||
5515 | + | ||
5516 | + | ||
5517 | + | ||
5518 | + | ||
5519 | + | ||
5520 | + | ||
5511 | 5521 |
| |
5512 | 5522 |
| |
5513 | 5523 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
22 | - | ||
22 | + | ||
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
| |||
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
42 | + | ||
43 | + | ||
44 | + | ||
45 | + | ||
46 | + | ||
47 | + | ||
48 | + | ||
49 | + | ||
50 | + | ||
42 | 51 |
| |
43 | 52 |
| |
44 | 53 |
| |
| |||
162 | 171 |
| |
163 | 172 |
| |
164 | 173 |
| |
174 | + | ||
165 | 175 |
| |
166 | 176 |
| |
167 | 177 |
| |
168 | 178 |
| |
169 | 179 |
| |
180 | + | ||
181 | + | ||
182 | + | ||
183 | + | ||
184 | + | ||
185 | + | ||
186 | + | ||
187 | + | ||
188 | + | ||
189 | + | ||
190 | + | ||
170 | 191 |
| |
171 | 192 |
| |
172 | 193 |
| |
| |||
246 | 267 |
| |
247 | 268 |
| |
248 | 269 |
| |
270 | + | ||
249 | 271 |
| |
250 | 272 |
| |
251 | 273 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4788 | 4788 |
| |
4789 | 4789 |
| |
4790 | 4790 |
| |
4791 | + | ||
4792 | + | ||
4793 | + | ||
4794 | + | ||
4791 | 4795 |
| |
4792 | 4796 |
| |
4793 | 4797 |
| |
| |||
5995 | 5999 |
| |
5996 | 6000 |
| |
5997 | 6001 |
| |
6002 | + | ||
6003 | + | ||
6004 | + | ||
6005 | + | ||
6006 | + | ||
6007 | + | ||
6008 | + | ||
6009 | + | ||
6010 | + | ||
6011 | + | ||
6012 | + | ||
5998 | 6013 |
| |
5999 | 6014 |
| |
6000 | 6015 |
| |
| |||
6196 | 6211 |
| |
6197 | 6212 |
| |
6198 | 6213 |
| |
6214 | + | ||
6215 | + | ||
6216 | + | ||
6217 | + | ||
6218 | + | ||
6199 | 6219 |
| |
6200 | 6220 |
| |
6201 | 6221 |
| |
6222 | + | ||
6202 | 6223 |
| |
6203 | 6224 |
| |
6204 | 6225 |
| |
| |||
9263 | 9284 |
| |
9264 | 9285 |
| |
9265 | 9286 |
| |
9287 | + | ||
9266 | 9288 |
| |
9267 | 9289 |
| |
9268 | 9290 |
| |
| |||
9300 | 9322 |
| |
9301 | 9323 |
| |
9302 | 9324 |
| |
9325 | + | ||
9303 | 9326 |
| |
9304 | 9327 |
| |
9305 | 9328 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
802 | 802 |
| |
803 | 803 |
| |
804 | 804 |
| |
805 | + | ||
805 | 806 |
| |
806 | 807 |
| |
807 | 808 |
| |
| |||
821 | 822 |
| |
822 | 823 |
| |
823 | 824 |
| |
825 | + | ||
824 | 826 |
| |
825 | 827 |
| |
826 | 828 |
| |
| |||
840 | 842 |
| |
841 | 843 |
| |
842 | 844 |
| |
845 | + | ||
843 | 846 |
| |
844 | 847 |
| |
845 | 848 |
| |
|
0 commit comments