-
Notifications
You must be signed in to change notification settings - Fork 3.8k
/
create_table
2343 lines (2051 loc) · 111 KB
/
create_table
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
parse
CREATE TABLE a ()
----
CREATE TABLE a ()
CREATE TABLE a () -- fully parenthesized
CREATE TABLE a () -- literals removed
CREATE TABLE _ () -- identifiers removed
parse
CREATE TABLE FAMILY (x INT)
----
CREATE TABLE "family" (x INT8) -- normalized!
CREATE TABLE "family" (x INT8) -- fully parenthesized
CREATE TABLE "family" (x INT8) -- literals removed
CREATE TABLE _ (_ INT8) -- identifiers removed
parse
CREATE TABLE INDEX (x INT)
----
CREATE TABLE "index" (x INT8) -- normalized!
CREATE TABLE "index" (x INT8) -- fully parenthesized
CREATE TABLE "index" (x INT8) -- literals removed
CREATE TABLE _ (_ INT8) -- identifiers removed
parse
CREATE TABLE NOTHING (x INT)
----
CREATE TABLE "nothing" (x INT8) -- normalized!
CREATE TABLE "nothing" (x INT8) -- fully parenthesized
CREATE TABLE "nothing" (x INT8) -- literals removed
CREATE TABLE _ (_ INT8) -- identifiers removed
parse
CREATE TABLE MINVALUE (x INT)
----
CREATE TABLE minvalue (x INT8) -- normalized!
CREATE TABLE minvalue (x INT8) -- fully parenthesized
CREATE TABLE minvalue (x INT8) -- literals removed
CREATE TABLE _ (_ INT8) -- identifiers removed
parse
CREATE TABLE MAXVALUE (x INT)
----
CREATE TABLE maxvalue (x INT8) -- normalized!
CREATE TABLE maxvalue (x INT8) -- fully parenthesized
CREATE TABLE maxvalue (x INT8) -- literals removed
CREATE TABLE _ (_ INT8) -- identifiers removed
parse
CREATE TABLE foo (MINVALUE INT)
----
CREATE TABLE foo (minvalue INT8) -- normalized!
CREATE TABLE foo (minvalue INT8) -- fully parenthesized
CREATE TABLE foo (minvalue INT8) -- literals removed
CREATE TABLE _ (_ INT8) -- identifiers removed
parse
CREATE TABLE foo (MAXVALUE INT)
----
CREATE TABLE foo (maxvalue INT8) -- normalized!
CREATE TABLE foo (maxvalue INT8) -- fully parenthesized
CREATE TABLE foo (maxvalue INT8) -- literals removed
CREATE TABLE _ (_ INT8) -- identifiers removed
parse
CREATE TEMPORARY TABLE a (b INT8)
----
CREATE TEMPORARY TABLE a (b INT8)
CREATE TEMPORARY TABLE a (b INT8) -- fully parenthesized
CREATE TEMPORARY TABLE a (b INT8) -- literals removed
CREATE TEMPORARY TABLE _ (_ INT8) -- identifiers removed
parse
CREATE UNLOGGED TABLE a (b INT8)
----
CREATE UNLOGGED TABLE a (b INT8)
CREATE UNLOGGED TABLE a (b INT8) -- fully parenthesized
CREATE UNLOGGED TABLE a (b INT8) -- literals removed
CREATE UNLOGGED TABLE _ (_ INT8) -- identifiers removed
parse
EXPLAIN CREATE TABLE a ()
----
EXPLAIN CREATE TABLE a ()
EXPLAIN CREATE TABLE a () -- fully parenthesized
EXPLAIN CREATE TABLE a () -- literals removed
EXPLAIN CREATE TABLE _ () -- identifiers removed
parse
CREATE TABLE a (b INT8)
----
CREATE TABLE a (b INT8)
CREATE TABLE a (b INT8) -- fully parenthesized
CREATE TABLE a (b INT8) -- literals removed
CREATE TABLE _ (_ INT8) -- identifiers removed
parse
CREATE TABLE a (b INT8, c INT8)
----
CREATE TABLE a (b INT8, c INT8)
CREATE TABLE a (b INT8, c INT8) -- fully parenthesized
CREATE TABLE a (b INT8, c INT8) -- literals removed
CREATE TABLE _ (_ INT8, _ INT8) -- identifiers removed
parse
CREATE TABLE a (b BIGINT, c SMALLINT, d INTEGER, e INT)
----
CREATE TABLE a (b INT8, c INT2, d INT8, e INT8) -- normalized!
CREATE TABLE a (b INT8, c INT2, d INT8, e INT8) -- fully parenthesized
CREATE TABLE a (b INT8, c INT2, d INT8, e INT8) -- literals removed
CREATE TABLE _ (_ INT8, _ INT2, _ INT8, _ INT8) -- identifiers removed
parse
CREATE TABLE a (b CHAR)
----
CREATE TABLE a (b CHAR)
CREATE TABLE a (b CHAR) -- fully parenthesized
CREATE TABLE a (b CHAR) -- literals removed
CREATE TABLE _ (_ CHAR) -- identifiers removed
parse
CREATE TABLE a (b CHAR(3))
----
CREATE TABLE a (b CHAR(3))
CREATE TABLE a (b CHAR(3)) -- fully parenthesized
CREATE TABLE a (b CHAR(3)) -- literals removed
CREATE TABLE _ (_ CHAR(3)) -- identifiers removed
parse
CREATE TABLE a (b VARCHAR)
----
CREATE TABLE a (b VARCHAR)
CREATE TABLE a (b VARCHAR) -- fully parenthesized
CREATE TABLE a (b VARCHAR) -- literals removed
CREATE TABLE _ (_ VARCHAR) -- identifiers removed
parse
CREATE TABLE a (b VARCHAR(3))
----
CREATE TABLE a (b VARCHAR(3))
CREATE TABLE a (b VARCHAR(3)) -- fully parenthesized
CREATE TABLE a (b VARCHAR(3)) -- literals removed
CREATE TABLE _ (_ VARCHAR(3)) -- identifiers removed
parse
CREATE TABLE a (b STRING)
----
CREATE TABLE a (b STRING)
CREATE TABLE a (b STRING) -- fully parenthesized
CREATE TABLE a (b STRING) -- literals removed
CREATE TABLE _ (_ STRING) -- identifiers removed
parse
CREATE TABLE a (b STRING(3))
----
CREATE TABLE a (b STRING(3))
CREATE TABLE a (b STRING(3)) -- fully parenthesized
CREATE TABLE a (b STRING(3)) -- literals removed
CREATE TABLE _ (_ STRING(3)) -- identifiers removed
parse
CREATE TABLE a (b TEXT)
----
CREATE TABLE a (b STRING) -- normalized!
CREATE TABLE a (b STRING) -- fully parenthesized
CREATE TABLE a (b STRING) -- literals removed
CREATE TABLE _ (_ STRING) -- identifiers removed
parse
CREATE TABLE a (b CHAR(1), c CHARACTER(1), d CHARACTER(3))
----
CREATE TABLE a (b CHAR, c CHAR, d CHAR(3)) -- normalized!
CREATE TABLE a (b CHAR, c CHAR, d CHAR(3)) -- fully parenthesized
CREATE TABLE a (b CHAR, c CHAR, d CHAR(3)) -- literals removed
CREATE TABLE _ (_ CHAR, _ CHAR, _ CHAR(3)) -- identifiers removed
parse
CREATE TABLE a (b CHAR VARYING, c CHARACTER VARYING(3))
----
CREATE TABLE a (b VARCHAR, c VARCHAR(3)) -- normalized!
CREATE TABLE a (b VARCHAR, c VARCHAR(3)) -- fully parenthesized
CREATE TABLE a (b VARCHAR, c VARCHAR(3)) -- literals removed
CREATE TABLE _ (_ VARCHAR, _ VARCHAR(3)) -- identifiers removed
error
CREATE TABLE foo(a CHAR(0))
----
at or near ")": syntax error: length for type CHAR must be at least 1
DETAIL: source SQL:
CREATE TABLE foo(a CHAR(0))
^
parse
CREATE TABLE a (b BIT VARYING(2), c BIT(1))
----
CREATE TABLE a (b VARBIT(2), c BIT) -- normalized!
CREATE TABLE a (b VARBIT(2), c BIT) -- fully parenthesized
CREATE TABLE a (b VARBIT(2), c BIT) -- literals removed
CREATE TABLE _ (_ VARBIT(2), _ BIT) -- identifiers removed
error
CREATE TABLE test (
foo BIT(0)
)
----
at or near ")": syntax error: length for type bit must be at least 1
DETAIL: source SQL:
CREATE TABLE test (
foo BIT(0)
^
parse
CREATE TABLE a (b JSON)
----
CREATE TABLE a (b JSONB) -- normalized!
CREATE TABLE a (b JSONB) -- fully parenthesized
CREATE TABLE a (b JSONB) -- literals removed
CREATE TABLE _ (_ JSONB) -- identifiers removed
parse
CREATE TABLE a (b FLOAT4)
----
CREATE TABLE a (b FLOAT4)
CREATE TABLE a (b FLOAT4) -- fully parenthesized
CREATE TABLE a (b FLOAT4) -- literals removed
CREATE TABLE _ (_ FLOAT4) -- identifiers removed
parse
CREATE TABLE a (b FLOAT8)
----
CREATE TABLE a (b FLOAT8)
CREATE TABLE a (b FLOAT8) -- fully parenthesized
CREATE TABLE a (b FLOAT8) -- literals removed
CREATE TABLE _ (_ FLOAT8) -- identifiers removed
parse
CREATE TABLE a (b FLOAT, c FLOAT(10), d FLOAT(40), e REAL, f DOUBLE PRECISION)
----
CREATE TABLE a (b FLOAT8, c FLOAT4, d FLOAT8, e FLOAT4, f FLOAT8) -- normalized!
CREATE TABLE a (b FLOAT8, c FLOAT4, d FLOAT8, e FLOAT4, f FLOAT8) -- fully parenthesized
CREATE TABLE a (b FLOAT8, c FLOAT4, d FLOAT8, e FLOAT4, f FLOAT8) -- literals removed
CREATE TABLE _ (_ FLOAT8, _ FLOAT4, _ FLOAT8, _ FLOAT4, _ FLOAT8) -- identifiers removed
parse
CREATE TABLE a (b NUMERIC, c NUMERIC(10), d DEC)
----
CREATE TABLE a (b DECIMAL, c DECIMAL(10), d DECIMAL) -- normalized!
CREATE TABLE a (b DECIMAL, c DECIMAL(10), d DECIMAL) -- fully parenthesized
CREATE TABLE a (b DECIMAL, c DECIMAL(10), d DECIMAL) -- literals removed
CREATE TABLE _ (_ DECIMAL, _ DECIMAL(10), _ DECIMAL) -- identifiers removed
parse
CREATE TABLE a (b BOOLEAN)
----
CREATE TABLE a (b BOOL) -- normalized!
CREATE TABLE a (b BOOL) -- fully parenthesized
CREATE TABLE a (b BOOL) -- literals removed
CREATE TABLE _ (_ BOOL) -- identifiers removed
parse
CREATE TABLE a (b SERIAL8)
----
CREATE TABLE a (b SERIAL8)
CREATE TABLE a (b SERIAL8) -- fully parenthesized
CREATE TABLE a (b SERIAL8) -- literals removed
CREATE TABLE _ (_ SERIAL8) -- identifiers removed
parse
CREATE TABLE a (b BIGSERIAL, c SMALLSERIAL, d SERIAL)
----
CREATE TABLE a (b SERIAL8, c SERIAL2, d SERIAL8) -- normalized!
CREATE TABLE a (b SERIAL8, c SERIAL2, d SERIAL8) -- fully parenthesized
CREATE TABLE a (b SERIAL8, c SERIAL2, d SERIAL8) -- literals removed
CREATE TABLE _ (_ SERIAL8, _ SERIAL2, _ SERIAL8) -- identifiers removed
parse
CREATE TABLE a (b TIMESTAMP WITH TIME ZONE)
----
CREATE TABLE a (b TIMESTAMPTZ) -- normalized!
CREATE TABLE a (b TIMESTAMPTZ) -- fully parenthesized
CREATE TABLE a (b TIMESTAMPTZ) -- literals removed
CREATE TABLE _ (_ TIMESTAMPTZ) -- identifiers removed
parse
CREATE TABLE a (b BYTES, c BYTEA, d BLOB)
----
CREATE TABLE a (b BYTES, c BYTES, d BYTES) -- normalized!
CREATE TABLE a (b BYTES, c BYTES, d BYTES) -- fully parenthesized
CREATE TABLE a (b BYTES, c BYTES, d BYTES) -- literals removed
CREATE TABLE _ (_ BYTES, _ BYTES, _ BYTES) -- identifiers removed
parse
CREATE TABLE a (b TIME)
----
CREATE TABLE a (b TIME)
CREATE TABLE a (b TIME) -- fully parenthesized
CREATE TABLE a (b TIME) -- literals removed
CREATE TABLE _ (_ TIME) -- identifiers removed
parse
CREATE TABLE a (b TIMETZ)
----
CREATE TABLE a (b TIMETZ)
CREATE TABLE a (b TIMETZ) -- fully parenthesized
CREATE TABLE a (b TIMETZ) -- literals removed
CREATE TABLE _ (_ TIMETZ) -- identifiers removed
parse
CREATE TABLE a (b TIME(3))
----
CREATE TABLE a (b TIME(3))
CREATE TABLE a (b TIME(3)) -- fully parenthesized
CREATE TABLE a (b TIME(3)) -- literals removed
CREATE TABLE _ (_ TIME(3)) -- identifiers removed
parse
CREATE TABLE a (b TIMETZ(3))
----
CREATE TABLE a (b TIMETZ(3))
CREATE TABLE a (b TIMETZ(3)) -- fully parenthesized
CREATE TABLE a (b TIMETZ(3)) -- literals removed
CREATE TABLE _ (_ TIMETZ(3)) -- identifiers removed
parse
CREATE TABLE a (b BOX2D)
----
CREATE TABLE a (b BOX2D)
CREATE TABLE a (b BOX2D) -- fully parenthesized
CREATE TABLE a (b BOX2D) -- literals removed
CREATE TABLE _ (_ BOX2D) -- identifiers removed
parse
CREATE TABLE a (b GEOGRAPHY)
----
CREATE TABLE a (b GEOGRAPHY)
CREATE TABLE a (b GEOGRAPHY) -- fully parenthesized
CREATE TABLE a (b GEOGRAPHY) -- literals removed
CREATE TABLE _ (_ GEOGRAPHY) -- identifiers removed
parse
CREATE TABLE a (b GEOGRAPHY(POINT))
----
CREATE TABLE a (b GEOGRAPHY(POINT))
CREATE TABLE a (b GEOGRAPHY(POINT)) -- fully parenthesized
CREATE TABLE a (b GEOGRAPHY(POINT)) -- literals removed
CREATE TABLE _ (_ GEOGRAPHY(POINT)) -- identifiers removed
parse
CREATE TABLE a (b GEOGRAPHY(POINT,4326))
----
CREATE TABLE a (b GEOGRAPHY(POINT,4326))
CREATE TABLE a (b GEOGRAPHY(POINT,4326)) -- fully parenthesized
CREATE TABLE a (b GEOGRAPHY(POINT,4326)) -- literals removed
CREATE TABLE _ (_ GEOGRAPHY(POINT,4326)) -- identifiers removed
parse
CREATE TABLE a (b GEOGRAPHY(LINESTRING,4326))
----
CREATE TABLE a (b GEOGRAPHY(LINESTRING,4326))
CREATE TABLE a (b GEOGRAPHY(LINESTRING,4326)) -- fully parenthesized
CREATE TABLE a (b GEOGRAPHY(LINESTRING,4326)) -- literals removed
CREATE TABLE _ (_ GEOGRAPHY(LINESTRING,4326)) -- identifiers removed
parse
CREATE TABLE a (b GEOGRAPHY(POLYGON,4326))
----
CREATE TABLE a (b GEOGRAPHY(POLYGON,4326))
CREATE TABLE a (b GEOGRAPHY(POLYGON,4326)) -- fully parenthesized
CREATE TABLE a (b GEOGRAPHY(POLYGON,4326)) -- literals removed
CREATE TABLE _ (_ GEOGRAPHY(POLYGON,4326)) -- identifiers removed
parse
CREATE TABLE a (b GEOGRAPHY(MULTIPOINT,4326))
----
CREATE TABLE a (b GEOGRAPHY(MULTIPOINT,4326))
CREATE TABLE a (b GEOGRAPHY(MULTIPOINT,4326)) -- fully parenthesized
CREATE TABLE a (b GEOGRAPHY(MULTIPOINT,4326)) -- literals removed
CREATE TABLE _ (_ GEOGRAPHY(MULTIPOINT,4326)) -- identifiers removed
parse
CREATE TABLE a (b GEOGRAPHY(MULTILINESTRING,4326))
----
CREATE TABLE a (b GEOGRAPHY(MULTILINESTRING,4326))
CREATE TABLE a (b GEOGRAPHY(MULTILINESTRING,4326)) -- fully parenthesized
CREATE TABLE a (b GEOGRAPHY(MULTILINESTRING,4326)) -- literals removed
CREATE TABLE _ (_ GEOGRAPHY(MULTILINESTRING,4326)) -- identifiers removed
parse
CREATE TABLE a (b GEOGRAPHY(MULTIPOLYGON,4326))
----
CREATE TABLE a (b GEOGRAPHY(MULTIPOLYGON,4326))
CREATE TABLE a (b GEOGRAPHY(MULTIPOLYGON,4326)) -- fully parenthesized
CREATE TABLE a (b GEOGRAPHY(MULTIPOLYGON,4326)) -- literals removed
CREATE TABLE _ (_ GEOGRAPHY(MULTIPOLYGON,4326)) -- identifiers removed
parse
CREATE TABLE a (b GEOGRAPHY(GEOMETRY,4326))
----
CREATE TABLE a (b GEOGRAPHY(GEOMETRY,4326))
CREATE TABLE a (b GEOGRAPHY(GEOMETRY,4326)) -- fully parenthesized
CREATE TABLE a (b GEOGRAPHY(GEOMETRY,4326)) -- literals removed
CREATE TABLE _ (_ GEOGRAPHY(GEOMETRY,4326)) -- identifiers removed
parse
CREATE TABLE a (b GEOGRAPHY(GEOMETRYCOLLECTION,4326))
----
CREATE TABLE a (b GEOGRAPHY(GEOMETRYCOLLECTION,4326))
CREATE TABLE a (b GEOGRAPHY(GEOMETRYCOLLECTION,4326)) -- fully parenthesized
CREATE TABLE a (b GEOGRAPHY(GEOMETRYCOLLECTION,4326)) -- literals removed
CREATE TABLE _ (_ GEOGRAPHY(GEOMETRYCOLLECTION,4326)) -- identifiers removed
parse
CREATE TABLE a (b GEOMETRY)
----
CREATE TABLE a (b GEOMETRY)
CREATE TABLE a (b GEOMETRY) -- fully parenthesized
CREATE TABLE a (b GEOMETRY) -- literals removed
CREATE TABLE _ (_ GEOMETRY) -- identifiers removed
parse
CREATE TABLE a (b GEOMETRY(POINT))
----
CREATE TABLE a (b GEOMETRY(POINT))
CREATE TABLE a (b GEOMETRY(POINT)) -- fully parenthesized
CREATE TABLE a (b GEOMETRY(POINT)) -- literals removed
CREATE TABLE _ (_ GEOMETRY(POINT)) -- identifiers removed
parse
CREATE TABLE a (b GEOMETRY(POINT,4326))
----
CREATE TABLE a (b GEOMETRY(POINT,4326))
CREATE TABLE a (b GEOMETRY(POINT,4326)) -- fully parenthesized
CREATE TABLE a (b GEOMETRY(POINT,4326)) -- literals removed
CREATE TABLE _ (_ GEOMETRY(POINT,4326)) -- identifiers removed
parse
CREATE TABLE a (b UUID)
----
CREATE TABLE a (b UUID)
CREATE TABLE a (b UUID) -- fully parenthesized
CREATE TABLE a (b UUID) -- literals removed
CREATE TABLE _ (_ UUID) -- identifiers removed
parse
CREATE TABLE a (b INET)
----
CREATE TABLE a (b INET)
CREATE TABLE a (b INET) -- fully parenthesized
CREATE TABLE a (b INET) -- literals removed
CREATE TABLE _ (_ INET) -- identifiers removed
parse
CREATE TABLE a (b "char")
----
CREATE TABLE a (b "char")
CREATE TABLE a (b "char") -- fully parenthesized
CREATE TABLE a (b "char") -- literals removed
CREATE TABLE _ (_ "char") -- identifiers removed
parse
CREATE TABLE a (b INT8 NULL)
----
CREATE TABLE a (b INT8 NULL)
CREATE TABLE a (b INT8 NULL) -- fully parenthesized
CREATE TABLE a (b INT8 NULL) -- literals removed
CREATE TABLE _ (_ INT8 NULL) -- identifiers removed
parse
CREATE TABLE a (b INT8 CONSTRAINT maybe NULL)
----
CREATE TABLE a (b INT8 CONSTRAINT maybe NULL)
CREATE TABLE a (b INT8 CONSTRAINT maybe NULL) -- fully parenthesized
CREATE TABLE a (b INT8 CONSTRAINT maybe NULL) -- literals removed
CREATE TABLE _ (_ INT8 CONSTRAINT _ NULL) -- identifiers removed
parse
CREATE TABLE a (b INT8 NOT NULL)
----
CREATE TABLE a (b INT8 NOT NULL)
CREATE TABLE a (b INT8 NOT NULL) -- fully parenthesized
CREATE TABLE a (b INT8 NOT NULL) -- literals removed
CREATE TABLE _ (_ INT8 NOT NULL) -- identifiers removed
parse
CREATE TABLE a (b INT8 CONSTRAINT always NOT NULL)
----
CREATE TABLE a (b INT8 CONSTRAINT always NOT NULL)
CREATE TABLE a (b INT8 CONSTRAINT always NOT NULL) -- fully parenthesized
CREATE TABLE a (b INT8 CONSTRAINT always NOT NULL) -- literals removed
CREATE TABLE _ (_ INT8 CONSTRAINT _ NOT NULL) -- identifiers removed
error
CREATE TABLE test (
foo INT8 NOT NULL NULL
)
----
at or near ")": syntax error: conflicting NULL/NOT NULL declarations for column "foo"
DETAIL: source SQL:
CREATE TABLE test (
foo INT8 NOT NULL NULL
)
^
error
CREATE TABLE test (
foo INT8 NULL NOT NULL
)
----
at or near ")": syntax error: conflicting NULL/NOT NULL declarations for column "foo"
DETAIL: source SQL:
CREATE TABLE test (
foo INT8 NULL NOT NULL
)
^
parse
CREATE TABLE a (b INT8 PRIMARY KEY)
----
CREATE TABLE a (b INT8 PRIMARY KEY)
CREATE TABLE a (b INT8 PRIMARY KEY) -- fully parenthesized
CREATE TABLE a (b INT8 PRIMARY KEY) -- literals removed
CREATE TABLE _ (_ INT8 PRIMARY KEY) -- identifiers removed
parse
CREATE TABLE a (b INT8 UNIQUE)
----
CREATE TABLE a (b INT8 UNIQUE)
CREATE TABLE a (b INT8 UNIQUE) -- fully parenthesized
CREATE TABLE a (b INT8 UNIQUE) -- literals removed
CREATE TABLE _ (_ INT8 UNIQUE) -- identifiers removed
parse
CREATE TABLE a (b INT, UNIQUE INDEX foo (b))
----
CREATE TABLE a (b INT8, CONSTRAINT foo UNIQUE (b)) -- normalized!
CREATE TABLE a (b INT8, CONSTRAINT foo UNIQUE (b)) -- fully parenthesized
CREATE TABLE a (b INT8, CONSTRAINT foo UNIQUE (b)) -- literals removed
CREATE TABLE _ (_ INT8, CONSTRAINT _ UNIQUE (_)) -- identifiers removed
parse
CREATE TABLE a (b INT, UNIQUE INDEX foo (b) WHERE c > 3)
----
CREATE TABLE a (b INT8, CONSTRAINT foo UNIQUE (b) WHERE c > 3) -- normalized!
CREATE TABLE a (b INT8, CONSTRAINT foo UNIQUE (b) WHERE ((c) > (3))) -- fully parenthesized
CREATE TABLE a (b INT8, CONSTRAINT foo UNIQUE (b) WHERE c > _) -- literals removed
CREATE TABLE _ (_ INT8, CONSTRAINT _ UNIQUE (_) WHERE _ > 3) -- identifiers removed
parse
CREATE TABLE a (b INT, UNIQUE INDEX foo (b) INTERLEAVE IN PARENT c (d))
----
CREATE TABLE a (b INT8, CONSTRAINT foo UNIQUE (b) INTERLEAVE IN PARENT c (d)) -- normalized!
CREATE TABLE a (b INT8, CONSTRAINT foo UNIQUE (b) INTERLEAVE IN PARENT c (d)) -- fully parenthesized
CREATE TABLE a (b INT8, CONSTRAINT foo UNIQUE (b) INTERLEAVE IN PARENT c (d)) -- literals removed
CREATE TABLE _ (_ INT8, CONSTRAINT _ UNIQUE (_) INTERLEAVE IN PARENT _ (_)) -- identifiers removed
parse
CREATE TABLE a (UNIQUE INDEX (b) PARTITION BY LIST (c) (PARTITION d VALUES IN (1)))
----
CREATE TABLE a (UNIQUE (b) PARTITION BY LIST (c) (PARTITION d VALUES IN (1))) -- normalized!
CREATE TABLE a (UNIQUE (b) PARTITION BY LIST (c) (PARTITION d VALUES IN ((1)))) -- fully parenthesized
CREATE TABLE a (UNIQUE (b) PARTITION BY LIST (c) (PARTITION d VALUES IN (_))) -- literals removed
CREATE TABLE _ (UNIQUE (_) PARTITION BY LIST (_) (PARTITION _ VALUES IN (1))) -- identifiers removed
parse
CREATE TABLE a (b INT8 UNIQUE WITHOUT INDEX)
----
CREATE TABLE a (b INT8 UNIQUE WITHOUT INDEX)
CREATE TABLE a (b INT8 UNIQUE WITHOUT INDEX) -- fully parenthesized
CREATE TABLE a (b INT8 UNIQUE WITHOUT INDEX) -- literals removed
CREATE TABLE _ (_ INT8 UNIQUE WITHOUT INDEX) -- identifiers removed
parse
CREATE TABLE a (b INT8 NULL PRIMARY KEY)
----
CREATE TABLE a (b INT8 NULL PRIMARY KEY)
CREATE TABLE a (b INT8 NULL PRIMARY KEY) -- fully parenthesized
CREATE TABLE a (b INT8 NULL PRIMARY KEY) -- literals removed
CREATE TABLE _ (_ INT8 NULL PRIMARY KEY) -- identifiers removed
parse
CREATE TABLE a (b INT8 DEFAULT 1)
----
CREATE TABLE a (b INT8 DEFAULT 1)
CREATE TABLE a (b INT8 DEFAULT (1)) -- fully parenthesized
CREATE TABLE a (b INT8 DEFAULT _) -- literals removed
CREATE TABLE _ (_ INT8 DEFAULT 1) -- identifiers removed
parse
CREATE TABLE a (b INT8 CONSTRAINT one DEFAULT 1)
----
CREATE TABLE a (b INT8 CONSTRAINT one DEFAULT 1)
CREATE TABLE a (b INT8 CONSTRAINT one DEFAULT (1)) -- fully parenthesized
CREATE TABLE a (b INT8 CONSTRAINT one DEFAULT _) -- literals removed
CREATE TABLE _ (_ INT8 CONSTRAINT _ DEFAULT 1) -- identifiers removed
parse
CREATE TABLE a (b INT8 DEFAULT now())
----
CREATE TABLE a (b INT8 DEFAULT now())
CREATE TABLE a (b INT8 DEFAULT ((now)())) -- fully parenthesized
CREATE TABLE a (b INT8 DEFAULT now()) -- literals removed
CREATE TABLE _ (_ INT8 DEFAULT now()) -- identifiers removed
error
CREATE TABLE test (
foo INT8 DEFAULT 1 DEFAULT 2
)
----
at or near ")": syntax error: multiple default values specified for column "foo"
DETAIL: source SQL:
CREATE TABLE test (
foo INT8 DEFAULT 1 DEFAULT 2
)
^
parse
CREATE TABLE a (a INT8 CHECK (a > 0))
----
CREATE TABLE a (a INT8 CHECK (a > 0))
CREATE TABLE a (a INT8 CHECK (((a) > (0)))) -- fully parenthesized
CREATE TABLE a (a INT8 CHECK (a > _)) -- literals removed
CREATE TABLE _ (_ INT8 CHECK (_ > 0)) -- identifiers removed
parse
CREATE TABLE a (a INT8 CONSTRAINT positive CHECK (a > 0))
----
CREATE TABLE a (a INT8 CONSTRAINT positive CHECK (a > 0))
CREATE TABLE a (a INT8 CONSTRAINT positive CHECK (((a) > (0)))) -- fully parenthesized
CREATE TABLE a (a INT8 CONSTRAINT positive CHECK (a > _)) -- literals removed
CREATE TABLE _ (_ INT8 CONSTRAINT _ CHECK (_ > 0)) -- identifiers removed
parse
CREATE TABLE a (a INT8 DEFAULT 1 CHECK (a > 0))
----
CREATE TABLE a (a INT8 DEFAULT 1 CHECK (a > 0))
CREATE TABLE a (a INT8 DEFAULT (1) CHECK (((a) > (0)))) -- fully parenthesized
CREATE TABLE a (a INT8 DEFAULT _ CHECK (a > _)) -- literals removed
CREATE TABLE _ (_ INT8 DEFAULT 1 CHECK (_ > 0)) -- identifiers removed
parse
CREATE TABLE a (a INT8 CONSTRAINT one DEFAULT 1 CHECK (a > 0))
----
CREATE TABLE a (a INT8 CONSTRAINT one DEFAULT 1 CHECK (a > 0))
CREATE TABLE a (a INT8 CONSTRAINT one DEFAULT (1) CHECK (((a) > (0)))) -- fully parenthesized
CREATE TABLE a (a INT8 CONSTRAINT one DEFAULT _ CHECK (a > _)) -- literals removed
CREATE TABLE _ (_ INT8 CONSTRAINT _ DEFAULT 1 CHECK (_ > 0)) -- identifiers removed
parse
CREATE TABLE a (a INT8 DEFAULT 1 CONSTRAINT positive CHECK (a > 0))
----
CREATE TABLE a (a INT8 DEFAULT 1 CONSTRAINT positive CHECK (a > 0))
CREATE TABLE a (a INT8 DEFAULT (1) CONSTRAINT positive CHECK (((a) > (0)))) -- fully parenthesized
CREATE TABLE a (a INT8 DEFAULT _ CONSTRAINT positive CHECK (a > _)) -- literals removed
CREATE TABLE _ (_ INT8 DEFAULT 1 CONSTRAINT _ CHECK (_ > 0)) -- identifiers removed
parse
CREATE TABLE a (a INT8 CONSTRAINT one DEFAULT 1 CONSTRAINT positive CHECK (a > 0))
----
CREATE TABLE a (a INT8 CONSTRAINT one DEFAULT 1 CONSTRAINT positive CHECK (a > 0))
CREATE TABLE a (a INT8 CONSTRAINT one DEFAULT (1) CONSTRAINT positive CHECK (((a) > (0)))) -- fully parenthesized
CREATE TABLE a (a INT8 CONSTRAINT one DEFAULT _ CONSTRAINT positive CHECK (a > _)) -- literals removed
CREATE TABLE _ (_ INT8 CONSTRAINT _ DEFAULT 1 CONSTRAINT _ CHECK (_ > 0)) -- identifiers removed
parse
CREATE TABLE a (a INT8 CONSTRAINT one CHECK (a > 0) CONSTRAINT two CHECK (a < 10))
----
CREATE TABLE a (a INT8 CONSTRAINT one CHECK (a > 0) CONSTRAINT two CHECK (a < 10))
CREATE TABLE a (a INT8 CONSTRAINT one CHECK (((a) > (0))) CONSTRAINT two CHECK (((a) < (10)))) -- fully parenthesized
CREATE TABLE a (a INT8 CONSTRAINT one CHECK (a > _) CONSTRAINT two CHECK (a < _)) -- literals removed
CREATE TABLE _ (_ INT8 CONSTRAINT _ CHECK (_ > 0) CONSTRAINT _ CHECK (_ < 10)) -- identifiers removed
parse
CREATE TABLE a (b INT, CHECK (b > 0) NOT VALID)
----
CREATE TABLE a (b INT8, CHECK (b > 0)) -- normalized!
CREATE TABLE a (b INT8, CHECK (((b) > (0)))) -- fully parenthesized
CREATE TABLE a (b INT8, CHECK (b > _)) -- literals removed
CREATE TABLE _ (_ INT8, CHECK (_ > 0)) -- identifiers removed
parse
CREATE TABLE a (b INT8 NOT VISIBLE)
----
CREATE TABLE a (b INT8 NOT VISIBLE)
CREATE TABLE a (b INT8 NOT VISIBLE) -- fully parenthesized
CREATE TABLE a (b INT8 NOT VISIBLE) -- literals removed
CREATE TABLE _ (_ INT8 NOT VISIBLE) -- identifiers removed
parse
CREATE TABLE a (b INT8 NOT VISIBLE NULL)
----
CREATE TABLE a (b INT8 NULL NOT VISIBLE) -- normalized!
CREATE TABLE a (b INT8 NULL NOT VISIBLE) -- fully parenthesized
CREATE TABLE a (b INT8 NULL NOT VISIBLE) -- literals removed
CREATE TABLE _ (_ INT8 NULL NOT VISIBLE) -- identifiers removed
parse
CREATE TABLE a (b INT8 NULL NOT VISIBLE)
----
CREATE TABLE a (b INT8 NULL NOT VISIBLE)
CREATE TABLE a (b INT8 NULL NOT VISIBLE) -- fully parenthesized
CREATE TABLE a (b INT8 NULL NOT VISIBLE) -- literals removed
CREATE TABLE _ (_ INT8 NULL NOT VISIBLE) -- identifiers removed
parse
CREATE TABLE a (b INT8 CONSTRAINT c NOT NULL NOT VISIBLE)
----
CREATE TABLE a (b INT8 CONSTRAINT c NOT NULL NOT VISIBLE)
CREATE TABLE a (b INT8 CONSTRAINT c NOT NULL NOT VISIBLE) -- fully parenthesized
CREATE TABLE a (b INT8 CONSTRAINT c NOT NULL NOT VISIBLE) -- literals removed
CREATE TABLE _ (_ INT8 CONSTRAINT _ NOT NULL NOT VISIBLE) -- identifiers removed
parse
CREATE TABLE a (b INT8, c STRING, PRIMARY KEY (b, c, "0"))
----
CREATE TABLE a (b INT8, c STRING, PRIMARY KEY (b, c, "0"))
CREATE TABLE a (b INT8, c STRING, PRIMARY KEY (b, c, "0")) -- fully parenthesized
CREATE TABLE a (b INT8, c STRING, PRIMARY KEY (b, c, "0")) -- literals removed
CREATE TABLE _ (_ INT8, _ STRING, PRIMARY KEY (_, _, _)) -- identifiers removed
parse
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other)
----
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other)
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other) -- fully parenthesized
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other) -- literals removed
CREATE TABLE _ (_ INT8, _ STRING, FOREIGN KEY (_) REFERENCES _) -- identifiers removed
error
CREATE TABLE test (
foo INT8 REFERENCES t1 REFERENCES t2
)
----
at or near ")": syntax error: multiple foreign key constraints specified for column "foo"
DETAIL: source SQL:
CREATE TABLE test (
foo INT8 REFERENCES t1 REFERENCES t2
)
^
parse
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON UPDATE RESTRICT)
----
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON UPDATE RESTRICT)
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON UPDATE RESTRICT) -- fully parenthesized
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON UPDATE RESTRICT) -- literals removed
CREATE TABLE _ (_ INT8, _ STRING, FOREIGN KEY (_) REFERENCES _ ON UPDATE RESTRICT) -- identifiers removed
parse
CREATE TABLE a (b INT8, c INT8 REFERENCES foo MATCH SIMPLE ON UPDATE RESTRICT)
----
CREATE TABLE a (b INT8, c INT8 REFERENCES foo ON UPDATE RESTRICT) -- normalized!
CREATE TABLE a (b INT8, c INT8 REFERENCES foo ON UPDATE RESTRICT) -- fully parenthesized
CREATE TABLE a (b INT8, c INT8 REFERENCES foo ON UPDATE RESTRICT) -- literals removed
CREATE TABLE _ (_ INT8, _ INT8 REFERENCES _ ON UPDATE RESTRICT) -- identifiers removed
parse
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE RESTRICT)
----
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE RESTRICT)
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE RESTRICT) -- fully parenthesized
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE RESTRICT) -- literals removed
CREATE TABLE _ (_ INT8, _ STRING, FOREIGN KEY (_) REFERENCES _ ON DELETE RESTRICT) -- identifiers removed
parse
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE RESTRICT ON UPDATE RESTRICT)
----
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE RESTRICT ON UPDATE RESTRICT)
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE RESTRICT ON UPDATE RESTRICT) -- fully parenthesized
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE RESTRICT ON UPDATE RESTRICT) -- literals removed
CREATE TABLE _ (_ INT8, _ STRING, FOREIGN KEY (_) REFERENCES _ ON DELETE RESTRICT ON UPDATE RESTRICT) -- identifiers removed
parse
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON UPDATE CASCADE)
----
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON UPDATE CASCADE)
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON UPDATE CASCADE) -- fully parenthesized
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON UPDATE CASCADE) -- literals removed
CREATE TABLE _ (_ INT8, _ STRING, FOREIGN KEY (_) REFERENCES _ ON UPDATE CASCADE) -- identifiers removed
parse
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE CASCADE)
----
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE CASCADE)
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE CASCADE) -- fully parenthesized
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE CASCADE) -- literals removed
CREATE TABLE _ (_ INT8, _ STRING, FOREIGN KEY (_) REFERENCES _ ON DELETE CASCADE) -- identifiers removed
parse
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE CASCADE ON UPDATE CASCADE)
----
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE CASCADE ON UPDATE CASCADE)
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE CASCADE ON UPDATE CASCADE) -- fully parenthesized
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE CASCADE ON UPDATE CASCADE) -- literals removed
CREATE TABLE _ (_ INT8, _ STRING, FOREIGN KEY (_) REFERENCES _ ON DELETE CASCADE ON UPDATE CASCADE) -- identifiers removed
parse
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON UPDATE SET NULL)
----
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON UPDATE SET NULL)
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON UPDATE SET NULL) -- fully parenthesized
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON UPDATE SET NULL) -- literals removed
CREATE TABLE _ (_ INT8, _ STRING, FOREIGN KEY (_) REFERENCES _ ON UPDATE SET NULL) -- identifiers removed
parse
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET NULL)
----
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET NULL)
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET NULL) -- fully parenthesized
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET NULL) -- literals removed
CREATE TABLE _ (_ INT8, _ STRING, FOREIGN KEY (_) REFERENCES _ ON DELETE SET NULL) -- identifiers removed
parse
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET NULL ON UPDATE SET NULL)
----
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET NULL ON UPDATE SET NULL)
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET NULL ON UPDATE SET NULL) -- fully parenthesized
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET NULL ON UPDATE SET NULL) -- literals removed
CREATE TABLE _ (_ INT8, _ STRING, FOREIGN KEY (_) REFERENCES _ ON DELETE SET NULL ON UPDATE SET NULL) -- identifiers removed
parse
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON UPDATE SET DEFAULT)
----
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON UPDATE SET DEFAULT)
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON UPDATE SET DEFAULT) -- fully parenthesized
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON UPDATE SET DEFAULT) -- literals removed
CREATE TABLE _ (_ INT8, _ STRING, FOREIGN KEY (_) REFERENCES _ ON UPDATE SET DEFAULT) -- identifiers removed
parse
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET DEFAULT)
----
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET DEFAULT)
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET DEFAULT) -- fully parenthesized
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET DEFAULT) -- literals removed
CREATE TABLE _ (_ INT8, _ STRING, FOREIGN KEY (_) REFERENCES _ ON DELETE SET DEFAULT) -- identifiers removed
parse
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET DEFAULT ON UPDATE SET DEFAULT)
----
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET DEFAULT ON UPDATE SET DEFAULT)
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET DEFAULT ON UPDATE SET DEFAULT) -- fully parenthesized
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET DEFAULT ON UPDATE SET DEFAULT) -- literals removed
CREATE TABLE _ (_ INT8, _ STRING, FOREIGN KEY (_) REFERENCES _ ON DELETE SET DEFAULT ON UPDATE SET DEFAULT) -- identifiers removed
parse
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE RESTRICT ON UPDATE SET DEFAULT)
----
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE RESTRICT ON UPDATE SET DEFAULT)
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE RESTRICT ON UPDATE SET DEFAULT) -- fully parenthesized
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE RESTRICT ON UPDATE SET DEFAULT) -- literals removed
CREATE TABLE _ (_ INT8, _ STRING, FOREIGN KEY (_) REFERENCES _ ON DELETE RESTRICT ON UPDATE SET DEFAULT) -- identifiers removed
parse
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET DEFAULT ON UPDATE CASCADE)
----
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET DEFAULT ON UPDATE CASCADE)
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET DEFAULT ON UPDATE CASCADE) -- fully parenthesized
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET DEFAULT ON UPDATE CASCADE) -- literals removed
CREATE TABLE _ (_ INT8, _ STRING, FOREIGN KEY (_) REFERENCES _ ON DELETE SET DEFAULT ON UPDATE CASCADE) -- identifiers removed
parse
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE CASCADE ON UPDATE SET NULL)
----
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE CASCADE ON UPDATE SET NULL)
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE CASCADE ON UPDATE SET NULL) -- fully parenthesized
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE CASCADE ON UPDATE SET NULL) -- literals removed
CREATE TABLE _ (_ INT8, _ STRING, FOREIGN KEY (_) REFERENCES _ ON DELETE CASCADE ON UPDATE SET NULL) -- identifiers removed
parse
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET NULL ON UPDATE RESTRICT)
----
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET NULL ON UPDATE RESTRICT)
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET NULL ON UPDATE RESTRICT) -- fully parenthesized
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET NULL ON UPDATE RESTRICT) -- literals removed
CREATE TABLE _ (_ INT8, _ STRING, FOREIGN KEY (_) REFERENCES _ ON DELETE SET NULL ON UPDATE RESTRICT) -- identifiers removed
parse
CREATE TABLE a (b INT8, c INT8 REFERENCES foo MATCH SIMPLE)
----
CREATE TABLE a (b INT8, c INT8 REFERENCES foo) -- normalized!
CREATE TABLE a (b INT8, c INT8 REFERENCES foo) -- fully parenthesized
CREATE TABLE a (b INT8, c INT8 REFERENCES foo) -- literals removed
CREATE TABLE _ (_ INT8, _ INT8 REFERENCES _) -- identifiers removed
parse
CREATE TABLE a (b INT8, c INT8 REFERENCES foo (bar) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION)
----
CREATE TABLE a (b INT8, c INT8 REFERENCES foo (bar)) -- normalized!
CREATE TABLE a (b INT8, c INT8 REFERENCES foo (bar)) -- fully parenthesized
CREATE TABLE a (b INT8, c INT8 REFERENCES foo (bar)) -- literals removed
CREATE TABLE _ (_ INT8, _ INT8 REFERENCES _ (_)) -- identifiers removed
parse
CREATE TABLE a (b INT8, FOREIGN KEY (b) REFERENCES other ON UPDATE NO ACTION ON DELETE NO ACTION)
----
CREATE TABLE a (b INT8, FOREIGN KEY (b) REFERENCES other) -- normalized!
CREATE TABLE a (b INT8, FOREIGN KEY (b) REFERENCES other) -- fully parenthesized
CREATE TABLE a (b INT8, FOREIGN KEY (b) REFERENCES other) -- literals removed
CREATE TABLE _ (_ INT8, FOREIGN KEY (_) REFERENCES _) -- identifiers removed
parse
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other MATCH SIMPLE ON DELETE SET DEFAULT ON UPDATE SET DEFAULT)
----
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET DEFAULT ON UPDATE SET DEFAULT) -- normalized!
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET DEFAULT ON UPDATE SET DEFAULT) -- fully parenthesized
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET DEFAULT ON UPDATE SET DEFAULT) -- literals removed
CREATE TABLE _ (_ INT8, _ STRING, FOREIGN KEY (_) REFERENCES _ ON DELETE SET DEFAULT ON UPDATE SET DEFAULT) -- identifiers removed
parse
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other MATCH SIMPLE ON DELETE RESTRICT ON UPDATE SET DEFAULT)
----
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE RESTRICT ON UPDATE SET DEFAULT) -- normalized!
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE RESTRICT ON UPDATE SET DEFAULT) -- fully parenthesized
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE RESTRICT ON UPDATE SET DEFAULT) -- literals removed
CREATE TABLE _ (_ INT8, _ STRING, FOREIGN KEY (_) REFERENCES _ ON DELETE RESTRICT ON UPDATE SET DEFAULT) -- identifiers removed
parse
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other MATCH SIMPLE ON DELETE SET DEFAULT ON UPDATE CASCADE)
----
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET DEFAULT ON UPDATE CASCADE) -- normalized!
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET DEFAULT ON UPDATE CASCADE) -- fully parenthesized
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET DEFAULT ON UPDATE CASCADE) -- literals removed
CREATE TABLE _ (_ INT8, _ STRING, FOREIGN KEY (_) REFERENCES _ ON DELETE SET DEFAULT ON UPDATE CASCADE) -- identifiers removed
parse
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other MATCH SIMPLE ON DELETE CASCADE ON UPDATE SET NULL)
----
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE CASCADE ON UPDATE SET NULL) -- normalized!
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE CASCADE ON UPDATE SET NULL) -- fully parenthesized
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE CASCADE ON UPDATE SET NULL) -- literals removed
CREATE TABLE _ (_ INT8, _ STRING, FOREIGN KEY (_) REFERENCES _ ON DELETE CASCADE ON UPDATE SET NULL) -- identifiers removed
parse
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other MATCH SIMPLE ON DELETE SET NULL ON UPDATE RESTRICT)
----
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET NULL ON UPDATE RESTRICT) -- normalized!
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET NULL ON UPDATE RESTRICT) -- fully parenthesized
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b) REFERENCES other ON DELETE SET NULL ON UPDATE RESTRICT) -- literals removed
CREATE TABLE _ (_ INT8, _ STRING, FOREIGN KEY (_) REFERENCES _ ON DELETE SET NULL ON UPDATE RESTRICT) -- identifiers removed
parse
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b, c) REFERENCES other MATCH SIMPLE)
----
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b, c) REFERENCES other) -- normalized!
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b, c) REFERENCES other) -- fully parenthesized
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b, c) REFERENCES other) -- literals removed
CREATE TABLE _ (_ INT8, _ STRING, FOREIGN KEY (_, _) REFERENCES _) -- identifiers removed
parse
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b, c) REFERENCES other (x, y) MATCH SIMPLE)
----
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b, c) REFERENCES other (x, y)) -- normalized!
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b, c) REFERENCES other (x, y)) -- fully parenthesized
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b, c) REFERENCES other (x, y)) -- literals removed
CREATE TABLE _ (_ INT8, _ STRING, FOREIGN KEY (_, _) REFERENCES _ (_, _)) -- identifiers removed
parse
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b, c) REFERENCES other (x, y) MATCH SIMPLE ON UPDATE CASCADE)
----
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b, c) REFERENCES other (x, y) ON UPDATE CASCADE) -- normalized!
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b, c) REFERENCES other (x, y) ON UPDATE CASCADE) -- fully parenthesized
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b, c) REFERENCES other (x, y) ON UPDATE CASCADE) -- literals removed
CREATE TABLE _ (_ INT8, _ STRING, FOREIGN KEY (_, _) REFERENCES _ (_, _) ON UPDATE CASCADE) -- identifiers removed
parse
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b, c) REFERENCES other (x, y) MATCH SIMPLE ON DELETE CASCADE)
----
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b, c) REFERENCES other (x, y) ON DELETE CASCADE) -- normalized!
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b, c) REFERENCES other (x, y) ON DELETE CASCADE) -- fully parenthesized
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b, c) REFERENCES other (x, y) ON DELETE CASCADE) -- literals removed
CREATE TABLE _ (_ INT8, _ STRING, FOREIGN KEY (_, _) REFERENCES _ (_, _) ON DELETE CASCADE) -- identifiers removed
parse
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b, c) REFERENCES other (x, y) MATCH SIMPLE ON DELETE CASCADE ON UPDATE SET NULL)
----
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b, c) REFERENCES other (x, y) ON DELETE CASCADE ON UPDATE SET NULL) -- normalized!
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b, c) REFERENCES other (x, y) ON DELETE CASCADE ON UPDATE SET NULL) -- fully parenthesized
CREATE TABLE a (b INT8, c STRING, FOREIGN KEY (b, c) REFERENCES other (x, y) ON DELETE CASCADE ON UPDATE SET NULL) -- literals removed
CREATE TABLE _ (_ INT8, _ STRING, FOREIGN KEY (_, _) REFERENCES _ (_, _) ON DELETE CASCADE ON UPDATE SET NULL) -- identifiers removed
parse
CREATE TABLE a (b INT8, FOREIGN KEY (b) REFERENCES other ON UPDATE RESTRICT ON DELETE RESTRICT)
----
CREATE TABLE a (b INT8, FOREIGN KEY (b) REFERENCES other ON DELETE RESTRICT ON UPDATE RESTRICT) -- normalized!
CREATE TABLE a (b INT8, FOREIGN KEY (b) REFERENCES other ON DELETE RESTRICT ON UPDATE RESTRICT) -- fully parenthesized
CREATE TABLE a (b INT8, FOREIGN KEY (b) REFERENCES other ON DELETE RESTRICT ON UPDATE RESTRICT) -- literals removed
CREATE TABLE _ (_ INT8, FOREIGN KEY (_) REFERENCES _ ON DELETE RESTRICT ON UPDATE RESTRICT) -- identifiers removed
parse
CREATE TABLE a (b INT8, FOREIGN KEY (b) REFERENCES other ON UPDATE RESTRICT ON DELETE NO ACTION)
----
CREATE TABLE a (b INT8, FOREIGN KEY (b) REFERENCES other ON UPDATE RESTRICT) -- normalized!
CREATE TABLE a (b INT8, FOREIGN KEY (b) REFERENCES other ON UPDATE RESTRICT) -- fully parenthesized
CREATE TABLE a (b INT8, FOREIGN KEY (b) REFERENCES other ON UPDATE RESTRICT) -- literals removed