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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
|
Registering pre-existing tables
onek
tenk1
stud_emp
<sql-statement>
--
-- ALTER_TABLE
--
-- Clean up in case a prior regression run failed
SET client_min_messages TO 'warning';
</sql-statement>
<sql-statement>
DROP ROLE IF EXISTS regress_alter_table_user1;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 287
DROP ROLE IF EXISTS regress_alter_table_user1;
^
<sql-statement>
RESET client_min_messages;
</sql-statement>
<sql-statement>
CREATE USER regress_alter_table_user1;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 285
CREATE USER regress_alter_table_user1;
^
<sql-statement>
--
-- add attribute
--
CREATE TABLE attmp (initial int4);
</sql-statement>
<sql-statement>
COMMENT ON TABLE attmp_wrong IS 'table comment';
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 258
COMMENT ON TABLE attmp_wrong IS 'table comment';
^
<sql-statement>
COMMENT ON TABLE attmp IS 'table comment';
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 258
COMMENT ON TABLE attmp IS 'table comment';
^
<sql-statement>
COMMENT ON TABLE attmp IS NULL;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 258
COMMENT ON TABLE attmp IS NULL;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN xmin integer; -- fails
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN xmin integer; -- fails
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN a int4 default 3;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN a int4 default 3;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN b name;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN b name;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN c text;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN c text;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN d float8;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN d float8;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN e float4;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN e float4;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN f int2;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN f int2;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN g polygon;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN g polygon;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN i char;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN i char;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN k int4;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN k int4;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN l tid;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN l tid;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN m xid;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN m xid;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN n oidvector;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN n oidvector;
^
<sql-statement>
--ALTER TABLE attmp ADD COLUMN o lock;
ALTER TABLE attmp ADD COLUMN p boolean;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
--ALTER TABLE attmp ADD COLUMN o lock;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN q point;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN q point;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN r lseg;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN r lseg;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN s path;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN s path;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN t box;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN t box;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN v timestamp;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN v timestamp;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN w interval;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN w interval;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN x float8[];
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN x float8[];
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN y float4[];
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN y float4[];
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN z int2[];
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN z int2[];
^
<sql-statement>
INSERT INTO attmp (a, b, c, d, e, f, g, i, k, l, m, n, p, q, r, s, t,
v, w, x, y, z)
VALUES (4, 'name', 'text', 4.1, 4.1, 2, '(4.1,4.1,3.1,3.1)',
'c',
314159, '(1,1)', '512',
'1 2 3 4 5 6 7 8', true, '(1.1,1.1)', '(4.1,4.1,3.1,3.1)',
'(0,2,4.1,4.1,3.1,3.1)', '(4.1,4.1,3.1,3.1)',
'epoch', '01:00:10', '{1.0,2.0,3.0,4.0}', '{1.0,2.0,3.0,4.0}', '{1,2,3,4}');
</sql-statement>
<sql-statement>
SELECT * FROM attmp;
</sql-statement>
<sql-statement>
DROP TABLE attmp;
</sql-statement>
<sql-statement>
-- the wolf bug - schema mods caused inconsistent row descriptors
CREATE TABLE attmp (
initial int4
);
</sql-statement>
<sql-statement>
ALTER TABLE attmp ADD COLUMN a int4;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN a int4;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN b name;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN b name;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN c text;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN c text;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN d float8;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN d float8;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN e float4;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN e float4;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN f int2;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN f int2;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN g polygon;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN g polygon;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN i char;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN i char;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN k int4;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN k int4;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN l tid;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN l tid;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN m xid;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN m xid;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN n oidvector;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN n oidvector;
^
<sql-statement>
--ALTER TABLE attmp ADD COLUMN o lock;
ALTER TABLE attmp ADD COLUMN p boolean;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
--ALTER TABLE attmp ADD COLUMN o lock;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN q point;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN q point;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN r lseg;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN r lseg;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN s path;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN s path;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN t box;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN t box;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN v timestamp;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN v timestamp;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN w interval;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN w interval;
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN x float8[];
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN x float8[];
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN y float4[];
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN y float4[];
^
<sql-statement>
ALTER TABLE attmp ADD COLUMN z int2[];
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp ADD COLUMN z int2[];
^
<sql-statement>
INSERT INTO attmp (a, b, c, d, e, f, g, i, k, l, m, n, p, q, r, s, t,
v, w, x, y, z)
VALUES (4, 'name', 'text', 4.1, 4.1, 2, '(4.1,4.1,3.1,3.1)',
'c',
314159, '(1,1)', '512',
'1 2 3 4 5 6 7 8', true, '(1.1,1.1)', '(4.1,4.1,3.1,3.1)',
'(0,2,4.1,4.1,3.1,3.1)', '(4.1,4.1,3.1,3.1)',
'epoch', '01:00:10', '{1.0,2.0,3.0,4.0}', '{1.0,2.0,3.0,4.0}', '{1,2,3,4}');
</sql-statement>
<sql-statement>
SELECT * FROM attmp;
</sql-statement>
<sql-statement>
CREATE INDEX attmp_idx ON attmp (a, (d + e), b);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: index expression is not supported yet
CREATE INDEX attmp_idx ON attmp (a, (d + e), b);
^
<sql-statement>
ALTER INDEX attmp_idx ALTER COLUMN 0 SET STATISTICS 1000;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:37: Error: ERROR: column number must be in range from 1 to 32767
ALTER INDEX attmp_idx ALTER COLUMN 0 SET STATISTICS 1000;
^
<sql-statement>
ALTER INDEX attmp_idx ALTER COLUMN 1 SET STATISTICS 1000;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER INDEX attmp_idx ALTER COLUMN 1 SET STATISTICS 1000;
^
<sql-statement>
ALTER INDEX attmp_idx ALTER COLUMN 2 SET STATISTICS 1000;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER INDEX attmp_idx ALTER COLUMN 2 SET STATISTICS 1000;
^
<sql-statement>
\d+ attmp_idx
</sql-statement>
Metacommand \d+ attmp_idx is not supported
<sql-statement>
ALTER INDEX attmp_idx ALTER COLUMN 3 SET STATISTICS 1000;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER INDEX attmp_idx ALTER COLUMN 3 SET STATISTICS 1000;
^
<sql-statement>
ALTER INDEX attmp_idx ALTER COLUMN 4 SET STATISTICS 1000;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER INDEX attmp_idx ALTER COLUMN 4 SET STATISTICS 1000;
^
<sql-statement>
ALTER INDEX attmp_idx ALTER COLUMN 2 SET STATISTICS -1;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER INDEX attmp_idx ALTER COLUMN 2 SET STATISTICS -1;
^
<sql-statement>
DROP TABLE attmp;
</sql-statement>
<sql-statement>
-- fails with incorrect object type
CREATE VIEW at_v1 AS SELECT 1 as a;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: expected at least one target column
-- fails with incorrect object type
^
<sql-statement>
ALTER TABLE at_v1 ALTER COLUMN a SET STATISTICS 0;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE at_v1 ALTER COLUMN a SET STATISTICS 0;
^
<sql-statement>
DROP VIEW at_v1;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: View not found: 'at_v1'
DROP VIEW at_v1;
^
<sql-statement>
--
-- rename - check on both non-temp and temp tables
--
CREATE TABLE attmp (regtable int);
</sql-statement>
<sql-statement>
CREATE TEMP TABLE attmp (attmptable int);
</sql-statement>
<sql-statement>
ALTER TABLE attmp RENAME TO attmp_new;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER TABLE attmp RENAME TO attmp_new;
^
<sql-statement>
SELECT * FROM attmp;
</sql-statement>
<sql-statement>
SELECT * FROM attmp_new;
</sql-statement>
-stdin-:<main>: Fatal: Table metadata loading
-stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.attmp_new
<sql-statement>
ALTER TABLE attmp RENAME TO attmp_new2;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER TABLE attmp RENAME TO attmp_new2;
^
<sql-statement>
SELECT * FROM attmp; -- should fail
</sql-statement>
<sql-statement>
SELECT * FROM attmp_new;
</sql-statement>
-stdin-:<main>: Fatal: Table metadata loading
-stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.attmp_new
<sql-statement>
SELECT * FROM attmp_new2;
</sql-statement>
-stdin-:<main>: Fatal: Table metadata loading
-stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.attmp_new2
<sql-statement>
DROP TABLE attmp_new;
</sql-statement>
<sql-statement>
DROP TABLE attmp_new2;
</sql-statement>
<sql-statement>
-- check rename of partitioned tables and indexes also
CREATE TABLE part_attmp (a int primary key) partition by range (a);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: PARTITION BY clause not supported
-- check rename of partitioned tables and indexes also
^
<sql-statement>
CREATE TABLE part_attmp1 PARTITION OF part_attmp FOR VALUES FROM (0) TO (100);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: table inheritance not supported
CREATE TABLE part_attmp1 PARTITION OF part_attmp FOR VALUES FROM (0) TO (100);
^
<sql-statement>
ALTER INDEX part_attmp_pkey RENAME TO part_attmp_index;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER INDEX part_attmp_pkey RENAME TO part_attmp_index;
^
<sql-statement>
ALTER INDEX part_attmp1_pkey RENAME TO part_attmp1_index;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER INDEX part_attmp1_pkey RENAME TO part_attmp1_index;
^
<sql-statement>
ALTER TABLE part_attmp RENAME TO part_at2tmp;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER TABLE part_attmp RENAME TO part_at2tmp;
^
<sql-statement>
ALTER TABLE part_attmp1 RENAME TO part_at2tmp1;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER TABLE part_attmp1 RENAME TO part_at2tmp1;
^
<sql-statement>
SET ROLE regress_alter_table_user1;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: VariableSetStmt, not supported name: role
SET ROLE regress_alter_table_user1;
^
<sql-statement>
ALTER INDEX part_attmp_index RENAME TO fail;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER INDEX part_attmp_index RENAME TO fail;
^
<sql-statement>
ALTER INDEX part_attmp1_index RENAME TO fail;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER INDEX part_attmp1_index RENAME TO fail;
^
<sql-statement>
ALTER TABLE part_at2tmp RENAME TO fail;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER TABLE part_at2tmp RENAME TO fail;
^
<sql-statement>
ALTER TABLE part_at2tmp1 RENAME TO fail;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER TABLE part_at2tmp1 RENAME TO fail;
^
<sql-statement>
RESET ROLE;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: VariableSetStmt, not supported kind: 4
RESET ROLE;
^
<sql-statement>
DROP TABLE part_at2tmp;
</sql-statement>
<sql-statement>
--
-- check renaming to a table's array type's autogenerated name
-- (the array type's name should get out of the way)
--
CREATE TABLE attmp_array (id int);
</sql-statement>
<sql-statement>
CREATE TABLE attmp_array2 (id int);
</sql-statement>
<sql-statement>
SELECT typname FROM pg_type WHERE oid = 'attmp_array[]'::regtype;
</sql-statement>
-stdin-:<main>: Fatal: Execution
-stdin-:<main>:1:1: Fatal: Execution of node: Result
SELECT typname FROM pg_type WHERE oid = 'attmp_array[]'::regtype;
^
-stdin-:<main>:1:1: Fatal: ERROR: type "attmp_array[]" does not exist
SELECT typname FROM pg_type WHERE oid = 'attmp_array[]'::regtype;
^
<sql-statement>
SELECT typname FROM pg_type WHERE oid = 'attmp_array2[]'::regtype;
</sql-statement>
-stdin-:<main>: Fatal: Execution
-stdin-:<main>:1:1: Fatal: Execution of node: Result
SELECT typname FROM pg_type WHERE oid = 'attmp_array2[]'::regtype;
^
-stdin-:<main>:1:1: Fatal: ERROR: type "attmp_array2[]" does not exist
SELECT typname FROM pg_type WHERE oid = 'attmp_array2[]'::regtype;
^
<sql-statement>
ALTER TABLE attmp_array2 RENAME TO _attmp_array;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER TABLE attmp_array2 RENAME TO _attmp_array;
^
<sql-statement>
SELECT typname FROM pg_type WHERE oid = 'attmp_array[]'::regtype;
</sql-statement>
-stdin-:<main>: Fatal: Execution
-stdin-:<main>:1:1: Fatal: Execution of node: Result
SELECT typname FROM pg_type WHERE oid = 'attmp_array[]'::regtype;
^
-stdin-:<main>:1:1: Fatal: ERROR: type "attmp_array[]" does not exist
SELECT typname FROM pg_type WHERE oid = 'attmp_array[]'::regtype;
^
<sql-statement>
SELECT typname FROM pg_type WHERE oid = '_attmp_array[]'::regtype;
</sql-statement>
-stdin-:<main>: Fatal: Execution
-stdin-:<main>:1:1: Fatal: Execution of node: Result
SELECT typname FROM pg_type WHERE oid = '_attmp_array[]'::regtype;
^
-stdin-:<main>:1:1: Fatal: ERROR: type "_attmp_array[]" does not exist
SELECT typname FROM pg_type WHERE oid = '_attmp_array[]'::regtype;
^
<sql-statement>
DROP TABLE _attmp_array;
</sql-statement>
<sql-statement>
DROP TABLE attmp_array;
</sql-statement>
<sql-statement>
-- renaming to table's own array type's name is an interesting corner case
CREATE TABLE attmp_array (id int);
</sql-statement>
<sql-statement>
SELECT typname FROM pg_type WHERE oid = 'attmp_array[]'::regtype;
</sql-statement>
-stdin-:<main>: Fatal: Execution
-stdin-:<main>:1:1: Fatal: Execution of node: Result
SELECT typname FROM pg_type WHERE oid = 'attmp_array[]'::regtype;
^
-stdin-:<main>:1:1: Fatal: ERROR: type "attmp_array[]" does not exist
SELECT typname FROM pg_type WHERE oid = 'attmp_array[]'::regtype;
^
<sql-statement>
ALTER TABLE attmp_array RENAME TO _attmp_array;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER TABLE attmp_array RENAME TO _attmp_array;
^
<sql-statement>
SELECT typname FROM pg_type WHERE oid = '_attmp_array[]'::regtype;
</sql-statement>
-stdin-:<main>: Fatal: Execution
-stdin-:<main>:1:1: Fatal: Execution of node: Result
SELECT typname FROM pg_type WHERE oid = '_attmp_array[]'::regtype;
^
-stdin-:<main>:1:1: Fatal: ERROR: type "_attmp_array[]" does not exist
SELECT typname FROM pg_type WHERE oid = '_attmp_array[]'::regtype;
^
<sql-statement>
DROP TABLE _attmp_array;
</sql-statement>
<sql-statement>
-- ALTER TABLE ... RENAME on non-table relations
-- renaming indexes (FIXME: this should probably test the index's functionality)
ALTER INDEX IF EXISTS __onek_unique1 RENAME TO attmp_onek_unique1;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
-- ALTER TABLE ... RENAME on non-table relations
^
<sql-statement>
ALTER INDEX IF EXISTS __attmp_onek_unique1 RENAME TO onek_unique1;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER INDEX IF EXISTS __attmp_onek_unique1 RENAME TO onek_unique1;
^
<sql-statement>
ALTER INDEX onek_unique1 RENAME TO attmp_onek_unique1;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER INDEX onek_unique1 RENAME TO attmp_onek_unique1;
^
<sql-statement>
ALTER INDEX attmp_onek_unique1 RENAME TO onek_unique1;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER INDEX attmp_onek_unique1 RENAME TO onek_unique1;
^
<sql-statement>
SET ROLE regress_alter_table_user1;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: VariableSetStmt, not supported name: role
SET ROLE regress_alter_table_user1;
^
<sql-statement>
ALTER INDEX onek_unique1 RENAME TO fail; -- permission denied
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER INDEX onek_unique1 RENAME TO fail; -- permission denied
^
<sql-statement>
RESET ROLE;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: VariableSetStmt, not supported kind: 4
RESET ROLE;
^
<sql-statement>
-- rename statements with mismatching statement and object types
CREATE TABLE alter_idx_rename_test (a INT);
</sql-statement>
<sql-statement>
CREATE INDEX alter_idx_rename_test_idx ON alter_idx_rename_test (a);
</sql-statement>
<sql-statement>
CREATE TABLE alter_idx_rename_test_parted (a INT) PARTITION BY LIST (a);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: PARTITION BY clause not supported
CREATE TABLE alter_idx_rename_test_parted (a INT) PARTITION BY LIST (a);
^
<sql-statement>
CREATE INDEX alter_idx_rename_test_parted_idx ON alter_idx_rename_test_parted (a);
</sql-statement>
<sql-statement>
BEGIN;
</sql-statement>
<sql-statement>
ALTER INDEX alter_idx_rename_test RENAME TO alter_idx_rename_test_2;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER INDEX alter_idx_rename_test RENAME TO alter_idx_rename_test_2;
^
<sql-statement>
ALTER INDEX alter_idx_rename_test_parted RENAME TO alter_idx_rename_test_parted_2;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER INDEX alter_idx_rename_test_parted RENAME TO alter_idx_rename_test_parted_2;
^
<sql-statement>
SELECT relation::regclass, mode FROM pg_locks
WHERE pid = pg_backend_pid() AND locktype = 'relation'
AND relation::regclass::text LIKE 'alter\_idx%'
ORDER BY relation::regclass::text COLLATE "C";
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 365
SELECT relation::regclass, mode FROM pg_locks
^
<sql-statement>
COMMIT;
</sql-statement>
<sql-statement>
BEGIN;
</sql-statement>
<sql-statement>
ALTER INDEX alter_idx_rename_test_idx RENAME TO alter_idx_rename_test_idx_2;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER INDEX alter_idx_rename_test_idx RENAME TO alter_idx_rename_test_idx_2;
^
<sql-statement>
ALTER INDEX alter_idx_rename_test_parted_idx RENAME TO alter_idx_rename_test_parted_idx_2;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER INDEX alter_idx_rename_test_parted_idx RENAME TO alter_idx_rename_test_parted_idx_2;
^
<sql-statement>
SELECT relation::regclass, mode FROM pg_locks
WHERE pid = pg_backend_pid() AND locktype = 'relation'
AND relation::regclass::text LIKE 'alter\_idx%'
ORDER BY relation::regclass::text COLLATE "C";
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 365
SELECT relation::regclass, mode FROM pg_locks
^
<sql-statement>
COMMIT;
</sql-statement>
<sql-statement>
BEGIN;
</sql-statement>
<sql-statement>
ALTER TABLE alter_idx_rename_test_idx_2 RENAME TO alter_idx_rename_test_idx_3;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER TABLE alter_idx_rename_test_idx_2 RENAME TO alter_idx_rename_test_idx_3;
^
<sql-statement>
ALTER TABLE alter_idx_rename_test_parted_idx_2 RENAME TO alter_idx_rename_test_parted_idx_3;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER TABLE alter_idx_rename_test_parted_idx_2 RENAME TO alter_idx_rename_test_parted_idx_3;
^
<sql-statement>
SELECT relation::regclass, mode FROM pg_locks
WHERE pid = pg_backend_pid() AND locktype = 'relation'
AND relation::regclass::text LIKE 'alter\_idx%'
ORDER BY relation::regclass::text COLLATE "C";
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 365
SELECT relation::regclass, mode FROM pg_locks
^
<sql-statement>
COMMIT;
</sql-statement>
<sql-statement>
DROP TABLE alter_idx_rename_test_2;
</sql-statement>
<sql-statement>
-- renaming views
CREATE VIEW attmp_view (unique1) AS SELECT unique1 FROM tenk1;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>: Error: Not all views have been dropped
<sql-statement>
ALTER TABLE attmp_view RENAME TO attmp_view_new;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER TABLE attmp_view RENAME TO attmp_view_new;
^
<sql-statement>
SET ROLE regress_alter_table_user1;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: VariableSetStmt, not supported name: role
SET ROLE regress_alter_table_user1;
^
<sql-statement>
ALTER VIEW attmp_view_new RENAME TO fail; -- permission denied
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER VIEW attmp_view_new RENAME TO fail; -- permission denied
^
<sql-statement>
RESET ROLE;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: VariableSetStmt, not supported kind: 4
RESET ROLE;
^
<sql-statement>
-- hack to ensure we get an indexscan here
set enable_seqscan to off;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: VariableSetStmt, not supported name: enable_seqscan
-- hack to ensure we get an indexscan here
^
<sql-statement>
set enable_bitmapscan to off;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: VariableSetStmt, not supported name: enable_bitmapscan
set enable_bitmapscan to off;
^
<sql-statement>
-- 5 values, sorted
SELECT unique1 FROM tenk1 WHERE unique1 < 5;
</sql-statement>
<sql-statement>
reset enable_seqscan;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: VariableSetStmt, not supported kind: 4
reset enable_seqscan;
^
<sql-statement>
reset enable_bitmapscan;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: VariableSetStmt, not supported kind: 4
reset enable_bitmapscan;
^
<sql-statement>
DROP VIEW attmp_view_new;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: View not found: 'attmp_view_new'
DROP VIEW attmp_view_new;
^
<sql-statement>
-- toast-like relation name
alter table stud_emp rename to pg_toast_stud_emp;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
-- toast-like relation name
^
<sql-statement>
alter table pg_toast_stud_emp rename to stud_emp;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
alter table pg_toast_stud_emp rename to stud_emp;
^
<sql-statement>
-- renaming index should rename constraint as well
ALTER TABLE onek ADD CONSTRAINT onek_unique1_constraint UNIQUE (unique1);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- renaming index should rename constraint as well
^
<sql-statement>
ALTER INDEX onek_unique1_constraint RENAME TO onek_unique1_constraint_foo;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER INDEX onek_unique1_constraint RENAME TO onek_unique1_constraint_foo;
^
<sql-statement>
ALTER TABLE onek DROP CONSTRAINT onek_unique1_constraint_foo;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE onek DROP CONSTRAINT onek_unique1_constraint_foo;
^
<sql-statement>
-- renaming constraint
ALTER TABLE onek ADD CONSTRAINT onek_check_constraint CHECK (unique1 >= 0);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- renaming constraint
^
<sql-statement>
ALTER TABLE onek RENAME CONSTRAINT onek_check_constraint TO onek_check_constraint_foo;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER TABLE onek RENAME CONSTRAINT onek_check_constraint TO onek_check_constraint_foo;
^
<sql-statement>
ALTER TABLE onek DROP CONSTRAINT onek_check_constraint_foo;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE onek DROP CONSTRAINT onek_check_constraint_foo;
^
<sql-statement>
-- renaming constraint should rename index as well
ALTER TABLE onek ADD CONSTRAINT onek_unique1_constraint UNIQUE (unique1);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- renaming constraint should rename index as well
^
<sql-statement>
DROP INDEX onek_unique1_constraint; -- to see whether it's there
</sql-statement>
-stdin-:<main>: Error: Pre type annotation
-stdin-:<main>:1:1: Error: Unexpected tag: pgObject
DROP INDEX onek_unique1_constraint; -- to see whether it's there
^
<sql-statement>
ALTER TABLE onek RENAME CONSTRAINT onek_unique1_constraint TO onek_unique1_constraint_foo;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER TABLE onek RENAME CONSTRAINT onek_unique1_constraint TO onek_unique1_constraint_foo;
^
<sql-statement>
DROP INDEX onek_unique1_constraint_foo; -- to see whether it's there
</sql-statement>
-stdin-:<main>: Error: Pre type annotation
-stdin-:<main>:1:1: Error: Unexpected tag: pgObject
DROP INDEX onek_unique1_constraint_foo; -- to see whether it's there
^
<sql-statement>
ALTER TABLE onek DROP CONSTRAINT onek_unique1_constraint_foo;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE onek DROP CONSTRAINT onek_unique1_constraint_foo;
^
<sql-statement>
-- renaming constraints vs. inheritance
CREATE TABLE constraint_rename_test (a int CONSTRAINT con1 CHECK (a > 0), b int, c int);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: column constraint not supported
-- renaming constraints vs. inheritance
^
<sql-statement>
\d constraint_rename_test
</sql-statement>
Metacommand \d constraint_rename_test is not supported
<sql-statement>
CREATE TABLE constraint_rename_test2 (a int CONSTRAINT con1 CHECK (a > 0), d int) INHERITS (constraint_rename_test);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: table inheritance not supported
CREATE TABLE constraint_rename_test2 (a int CONSTRAINT con1 CHECK (a > 0), d int) INHERITS (constraint_rename_test);
^
<sql-statement>
\d constraint_rename_test2
</sql-statement>
Metacommand \d constraint_rename_test2 is not supported
<sql-statement>
ALTER TABLE constraint_rename_test2 RENAME CONSTRAINT con1 TO con1foo; -- fail
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER TABLE constraint_rename_test2 RENAME CONSTRAINT con1 TO con1foo; -- fail
^
<sql-statement>
ALTER TABLE ONLY constraint_rename_test RENAME CONSTRAINT con1 TO con1foo; -- fail
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER TABLE ONLY constraint_rename_test RENAME CONSTRAINT con1 TO con1foo; -- fail
^
<sql-statement>
ALTER TABLE constraint_rename_test RENAME CONSTRAINT con1 TO con1foo; -- ok
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER TABLE constraint_rename_test RENAME CONSTRAINT con1 TO con1foo; -- ok
^
<sql-statement>
\d constraint_rename_test
</sql-statement>
Metacommand \d constraint_rename_test is not supported
<sql-statement>
\d constraint_rename_test2
</sql-statement>
Metacommand \d constraint_rename_test2 is not supported
<sql-statement>
ALTER TABLE constraint_rename_test ADD CONSTRAINT con2 CHECK (b > 0) NO INHERIT;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE constraint_rename_test ADD CONSTRAINT con2 CHECK (b > 0) NO INHERIT;
^
<sql-statement>
ALTER TABLE ONLY constraint_rename_test RENAME CONSTRAINT con2 TO con2foo; -- ok
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER TABLE ONLY constraint_rename_test RENAME CONSTRAINT con2 TO con2foo; -- ok
^
<sql-statement>
ALTER TABLE constraint_rename_test RENAME CONSTRAINT con2foo TO con2bar; -- ok
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER TABLE constraint_rename_test RENAME CONSTRAINT con2foo TO con2bar; -- ok
^
<sql-statement>
\d constraint_rename_test
</sql-statement>
Metacommand \d constraint_rename_test is not supported
<sql-statement>
\d constraint_rename_test2
</sql-statement>
Metacommand \d constraint_rename_test2 is not supported
<sql-statement>
ALTER TABLE constraint_rename_test ADD CONSTRAINT con3 PRIMARY KEY (a);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE constraint_rename_test ADD CONSTRAINT con3 PRIMARY KEY (a);
^
<sql-statement>
ALTER TABLE constraint_rename_test RENAME CONSTRAINT con3 TO con3foo; -- ok
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER TABLE constraint_rename_test RENAME CONSTRAINT con3 TO con3foo; -- ok
^
<sql-statement>
\d constraint_rename_test
</sql-statement>
Metacommand \d constraint_rename_test is not supported
<sql-statement>
\d constraint_rename_test2
</sql-statement>
Metacommand \d constraint_rename_test2 is not supported
<sql-statement>
DROP TABLE constraint_rename_test2;
</sql-statement>
<sql-statement>
DROP TABLE constraint_rename_test;
</sql-statement>
<sql-statement>
ALTER TABLE IF EXISTS constraint_not_exist RENAME CONSTRAINT con3 TO con3foo; -- ok
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER TABLE IF EXISTS constraint_not_exist RENAME CONSTRAINT con3 TO con3foo; -- ok
^
<sql-statement>
ALTER TABLE IF EXISTS constraint_rename_test ADD CONSTRAINT con4 UNIQUE (a);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE IF EXISTS constraint_rename_test ADD CONSTRAINT con4 UNIQUE (a);
^
<sql-statement>
-- renaming constraints with cache reset of target relation
CREATE TABLE constraint_rename_cache (a int,
CONSTRAINT chk_a CHECK (a > 0),
PRIMARY KEY (a));
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: table constraint not supported
-- renaming constraints with cache reset of target relation
^
<sql-statement>
ALTER TABLE constraint_rename_cache
RENAME CONSTRAINT chk_a TO chk_a_new;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER TABLE constraint_rename_cache
^
<sql-statement>
ALTER TABLE constraint_rename_cache
RENAME CONSTRAINT constraint_rename_cache_pkey TO constraint_rename_pkey_new;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
ALTER TABLE constraint_rename_cache
^
<sql-statement>
CREATE TABLE like_constraint_rename_cache
(LIKE constraint_rename_cache INCLUDING ALL);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: CreateStmt: alternative is not implemented yet : 389
CREATE TABLE like_constraint_rename_cache
^
<sql-statement>
\d like_constraint_rename_cache
</sql-statement>
Metacommand \d like_constraint_rename_cache is not supported
<sql-statement>
DROP TABLE constraint_rename_cache;
</sql-statement>
<sql-statement>
DROP TABLE like_constraint_rename_cache;
</sql-statement>
<sql-statement>
-- FOREIGN KEY CONSTRAINT adding TEST
CREATE TABLE attmp2 (a int primary key);
</sql-statement>
<sql-statement>
CREATE TABLE attmp3 (a int, b int);
</sql-statement>
<sql-statement>
CREATE TABLE attmp4 (a int, b int, unique(a,b));
</sql-statement>
<sql-statement>
CREATE TABLE attmp5 (a int, b int);
</sql-statement>
<sql-statement>
-- Insert rows into attmp2 (pktable)
INSERT INTO attmp2 values (1);
</sql-statement>
<sql-statement>
INSERT INTO attmp2 values (2);
</sql-statement>
<sql-statement>
INSERT INTO attmp2 values (3);
</sql-statement>
<sql-statement>
INSERT INTO attmp2 values (4);
</sql-statement>
<sql-statement>
-- Insert rows into attmp3
INSERT INTO attmp3 values (1,10);
</sql-statement>
<sql-statement>
INSERT INTO attmp3 values (1,20);
</sql-statement>
<sql-statement>
INSERT INTO attmp3 values (5,50);
</sql-statement>
<sql-statement>
-- Try (and fail) to add constraint due to invalid source columns
ALTER TABLE attmp3 add constraint attmpconstr foreign key(c) references attmp2 match full;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- Try (and fail) to add constraint due to invalid source columns
^
<sql-statement>
-- Try (and fail) to add constraint due to invalid destination columns explicitly given
ALTER TABLE attmp3 add constraint attmpconstr foreign key(a) references attmp2(b) match full;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- Try (and fail) to add constraint due to invalid destination columns explicitly given
^
<sql-statement>
-- Try (and fail) to add constraint due to invalid data
ALTER TABLE attmp3 add constraint attmpconstr foreign key (a) references attmp2 match full;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- Try (and fail) to add constraint due to invalid data
^
<sql-statement>
-- Delete failing row
DELETE FROM attmp3 where a=5;
</sql-statement>
-stdin-:<main>: Fatal: Pre type annotation
-stdin-:<main>: Fatal: tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp:70: Key 'pg_delete' not found in enum NYql::EYtSettingType. Valid options are: 'initial', 'infer_scheme', 'force_infer_schema', 'do_not_fail_on_invalid_schema', 'direct_read', 'view', 'mode', 'scheme', 'weak_concat', 'anonymous', 'with_qb', 'inline', 'sample', 'joinLabel', 'ignore_non_existing', 'warn_non_existing', 'xlock', 'unordered', 'nonUnique', 'userschema', 'usercolumns', 'statcolumns', 'syscolumns', 'ignoretypev3', 'memUsage', 'itemsCount', 'rowFactor', 'ordered', 'keyFilter', 'keyFilter2', 'take', 'skip', 'limit', 'sortLimitBy', 'sortBy', 'reduceBy', 'reduceFilterBy', 'forceTransform', 'weakFields', 'sharded', 'combineChunks', 'jobCount', 'joinReduce', 'firstAsPrimary', 'flow', 'keepSorted', 'keySwitch', 'uniqueBy', 'opHash', 'mapOutputType', 'reduceInputType', 'noDq', 'split', 'compression_codec', 'erasure_codec', 'expiration', 'replication_factor', 'user_attrs', 'media', 'primary_medium', 'keep_meta', 'monotonic_keys', 'mutationid'.
<sql-statement>
-- Try (and succeed)
ALTER TABLE attmp3 add constraint attmpconstr foreign key (a) references attmp2 match full;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- Try (and succeed)
^
<sql-statement>
ALTER TABLE attmp3 drop constraint attmpconstr;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp3 drop constraint attmpconstr;
^
<sql-statement>
INSERT INTO attmp3 values (5,50);
</sql-statement>
<sql-statement>
-- Try NOT VALID and then VALIDATE CONSTRAINT, but fails. Delete failure then re-validate
ALTER TABLE attmp3 add constraint attmpconstr foreign key (a) references attmp2 match full NOT VALID;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- Try NOT VALID and then VALIDATE CONSTRAINT, but fails. Delete failure then re-validate
^
<sql-statement>
ALTER TABLE attmp3 validate constraint attmpconstr;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp3 validate constraint attmpconstr;
^
<sql-statement>
-- Delete failing row
DELETE FROM attmp3 where a=5;
</sql-statement>
-stdin-:<main>: Fatal: Pre type annotation
-stdin-:<main>: Fatal: tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp:70: Key 'pg_delete' not found in enum NYql::EYtSettingType. Valid options are: 'initial', 'infer_scheme', 'force_infer_schema', 'do_not_fail_on_invalid_schema', 'direct_read', 'view', 'mode', 'scheme', 'weak_concat', 'anonymous', 'with_qb', 'inline', 'sample', 'joinLabel', 'ignore_non_existing', 'warn_non_existing', 'xlock', 'unordered', 'nonUnique', 'userschema', 'usercolumns', 'statcolumns', 'syscolumns', 'ignoretypev3', 'memUsage', 'itemsCount', 'rowFactor', 'ordered', 'keyFilter', 'keyFilter2', 'take', 'skip', 'limit', 'sortLimitBy', 'sortBy', 'reduceBy', 'reduceFilterBy', 'forceTransform', 'weakFields', 'sharded', 'combineChunks', 'jobCount', 'joinReduce', 'firstAsPrimary', 'flow', 'keepSorted', 'keySwitch', 'uniqueBy', 'opHash', 'mapOutputType', 'reduceInputType', 'noDq', 'split', 'compression_codec', 'erasure_codec', 'expiration', 'replication_factor', 'user_attrs', 'media', 'primary_medium', 'keep_meta', 'monotonic_keys', 'mutationid'.
<sql-statement>
-- Try (and succeed) and repeat to show it works on already valid constraint
ALTER TABLE attmp3 validate constraint attmpconstr;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- Try (and succeed) and repeat to show it works on already valid constraint
^
<sql-statement>
ALTER TABLE attmp3 validate constraint attmpconstr;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp3 validate constraint attmpconstr;
^
<sql-statement>
-- Try a non-verified CHECK constraint
ALTER TABLE attmp3 ADD CONSTRAINT b_greater_than_ten CHECK (b > 10); -- fail
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- Try a non-verified CHECK constraint
^
<sql-statement>
ALTER TABLE attmp3 ADD CONSTRAINT b_greater_than_ten CHECK (b > 10) NOT VALID; -- succeeds
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp3 ADD CONSTRAINT b_greater_than_ten CHECK (b > 10) NOT VALID; -- succeeds
^
<sql-statement>
ALTER TABLE attmp3 VALIDATE CONSTRAINT b_greater_than_ten; -- fails
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp3 VALIDATE CONSTRAINT b_greater_than_ten; -- fails
^
<sql-statement>
DELETE FROM attmp3 WHERE NOT b > 10;
</sql-statement>
-stdin-:<main>: Fatal: Pre type annotation
-stdin-:<main>: Fatal: tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp:70: Key 'pg_delete' not found in enum NYql::EYtSettingType. Valid options are: 'initial', 'infer_scheme', 'force_infer_schema', 'do_not_fail_on_invalid_schema', 'direct_read', 'view', 'mode', 'scheme', 'weak_concat', 'anonymous', 'with_qb', 'inline', 'sample', 'joinLabel', 'ignore_non_existing', 'warn_non_existing', 'xlock', 'unordered', 'nonUnique', 'userschema', 'usercolumns', 'statcolumns', 'syscolumns', 'ignoretypev3', 'memUsage', 'itemsCount', 'rowFactor', 'ordered', 'keyFilter', 'keyFilter2', 'take', 'skip', 'limit', 'sortLimitBy', 'sortBy', 'reduceBy', 'reduceFilterBy', 'forceTransform', 'weakFields', 'sharded', 'combineChunks', 'jobCount', 'joinReduce', 'firstAsPrimary', 'flow', 'keepSorted', 'keySwitch', 'uniqueBy', 'opHash', 'mapOutputType', 'reduceInputType', 'noDq', 'split', 'compression_codec', 'erasure_codec', 'expiration', 'replication_factor', 'user_attrs', 'media', 'primary_medium', 'keep_meta', 'monotonic_keys', 'mutationid'.
<sql-statement>
ALTER TABLE attmp3 VALIDATE CONSTRAINT b_greater_than_ten; -- succeeds
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp3 VALIDATE CONSTRAINT b_greater_than_ten; -- succeeds
^
<sql-statement>
ALTER TABLE attmp3 VALIDATE CONSTRAINT b_greater_than_ten; -- succeeds
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp3 VALIDATE CONSTRAINT b_greater_than_ten; -- succeeds
^
<sql-statement>
-- Test inherited NOT VALID CHECK constraints
select * from attmp3;
</sql-statement>
<sql-statement>
CREATE TABLE attmp6 () INHERITS (attmp3);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: table inheritance not supported
CREATE TABLE attmp6 () INHERITS (attmp3);
^
<sql-statement>
CREATE TABLE attmp7 () INHERITS (attmp3);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: table inheritance not supported
CREATE TABLE attmp7 () INHERITS (attmp3);
^
<sql-statement>
INSERT INTO attmp6 VALUES (6, 30), (7, 16);
</sql-statement>
-stdin-:<main>: Fatal: Table metadata loading
-stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.attmp6
<sql-statement>
ALTER TABLE attmp3 ADD CONSTRAINT b_le_20 CHECK (b <= 20) NOT VALID;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp3 ADD CONSTRAINT b_le_20 CHECK (b <= 20) NOT VALID;
^
<sql-statement>
ALTER TABLE attmp3 VALIDATE CONSTRAINT b_le_20; -- fails
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp3 VALIDATE CONSTRAINT b_le_20; -- fails
^
<sql-statement>
DELETE FROM attmp6 WHERE b > 20;
</sql-statement>
-stdin-:<main>: Fatal: Pre type annotation
-stdin-:<main>: Fatal: tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp:70: Key 'pg_delete' not found in enum NYql::EYtSettingType. Valid options are: 'initial', 'infer_scheme', 'force_infer_schema', 'do_not_fail_on_invalid_schema', 'direct_read', 'view', 'mode', 'scheme', 'weak_concat', 'anonymous', 'with_qb', 'inline', 'sample', 'joinLabel', 'ignore_non_existing', 'warn_non_existing', 'xlock', 'unordered', 'nonUnique', 'userschema', 'usercolumns', 'statcolumns', 'syscolumns', 'ignoretypev3', 'memUsage', 'itemsCount', 'rowFactor', 'ordered', 'keyFilter', 'keyFilter2', 'take', 'skip', 'limit', 'sortLimitBy', 'sortBy', 'reduceBy', 'reduceFilterBy', 'forceTransform', 'weakFields', 'sharded', 'combineChunks', 'jobCount', 'joinReduce', 'firstAsPrimary', 'flow', 'keepSorted', 'keySwitch', 'uniqueBy', 'opHash', 'mapOutputType', 'reduceInputType', 'noDq', 'split', 'compression_codec', 'erasure_codec', 'expiration', 'replication_factor', 'user_attrs', 'media', 'primary_medium', 'keep_meta', 'monotonic_keys', 'mutationid'.
<sql-statement>
ALTER TABLE attmp3 VALIDATE CONSTRAINT b_le_20; -- succeeds
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp3 VALIDATE CONSTRAINT b_le_20; -- succeeds
^
<sql-statement>
-- An already validated constraint must not be revalidated
CREATE FUNCTION boo(int) RETURNS int IMMUTABLE STRICT LANGUAGE plpgsql AS $$ BEGIN RAISE NOTICE 'boo: %', $1; RETURN $1; END; $$;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 261
-- An already validated constraint must not be revalidated
^
<sql-statement>
INSERT INTO attmp7 VALUES (8, 18);
</sql-statement>
-stdin-:<main>: Fatal: Table metadata loading
-stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.attmp7
<sql-statement>
ALTER TABLE attmp7 ADD CONSTRAINT identity CHECK (b = boo(b));
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp7 ADD CONSTRAINT identity CHECK (b = boo(b));
^
<sql-statement>
ALTER TABLE attmp3 ADD CONSTRAINT IDENTITY check (b = boo(b)) NOT VALID;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp3 ADD CONSTRAINT IDENTITY check (b = boo(b)) NOT VALID;
^
<sql-statement>
ALTER TABLE attmp3 VALIDATE CONSTRAINT identity;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE attmp3 VALIDATE CONSTRAINT identity;
^
<sql-statement>
-- A NO INHERIT constraint should not be looked for in children during VALIDATE CONSTRAINT
create table parent_noinh_convalid (a int);
</sql-statement>
<sql-statement>
create table child_noinh_convalid () inherits (parent_noinh_convalid);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: table inheritance not supported
create table child_noinh_convalid () inherits (parent_noinh_convalid);
^
<sql-statement>
insert into parent_noinh_convalid values (1);
</sql-statement>
<sql-statement>
insert into child_noinh_convalid values (1);
</sql-statement>
-stdin-:<main>: Fatal: Table metadata loading
-stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.child_noinh_convalid
<sql-statement>
alter table parent_noinh_convalid add constraint check_a_is_2 check (a = 2) no inherit not valid;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table parent_noinh_convalid add constraint check_a_is_2 check (a = 2) no inherit not valid;
^
<sql-statement>
-- fail, because of the row in parent
alter table parent_noinh_convalid validate constraint check_a_is_2;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- fail, because of the row in parent
^
<sql-statement>
delete from only parent_noinh_convalid;
</sql-statement>
-stdin-:<main>: Fatal: Pre type annotation
-stdin-:<main>: Fatal: tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp:70: Key 'pg_delete' not found in enum NYql::EYtSettingType. Valid options are: 'initial', 'infer_scheme', 'force_infer_schema', 'do_not_fail_on_invalid_schema', 'direct_read', 'view', 'mode', 'scheme', 'weak_concat', 'anonymous', 'with_qb', 'inline', 'sample', 'joinLabel', 'ignore_non_existing', 'warn_non_existing', 'xlock', 'unordered', 'nonUnique', 'userschema', 'usercolumns', 'statcolumns', 'syscolumns', 'ignoretypev3', 'memUsage', 'itemsCount', 'rowFactor', 'ordered', 'keyFilter', 'keyFilter2', 'take', 'skip', 'limit', 'sortLimitBy', 'sortBy', 'reduceBy', 'reduceFilterBy', 'forceTransform', 'weakFields', 'sharded', 'combineChunks', 'jobCount', 'joinReduce', 'firstAsPrimary', 'flow', 'keepSorted', 'keySwitch', 'uniqueBy', 'opHash', 'mapOutputType', 'reduceInputType', 'noDq', 'split', 'compression_codec', 'erasure_codec', 'expiration', 'replication_factor', 'user_attrs', 'media', 'primary_medium', 'keep_meta', 'monotonic_keys', 'mutationid'.
<sql-statement>
-- ok (parent itself contains no violating rows)
alter table parent_noinh_convalid validate constraint check_a_is_2;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- ok (parent itself contains no violating rows)
^
<sql-statement>
select convalidated from pg_constraint where conrelid = 'parent_noinh_convalid'::regclass and conname = 'check_a_is_2';
</sql-statement>
<sql-statement>
-- cleanup
drop table parent_noinh_convalid, child_noinh_convalid;
</sql-statement>
<sql-statement>
-- Try (and fail) to create constraint from attmp5(a) to attmp4(a) - unique constraint on
-- attmp4 is a,b
ALTER TABLE attmp5 add constraint attmpconstr foreign key(a) references attmp4(a) match full;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- Try (and fail) to create constraint from attmp5(a) to attmp4(a) - unique constraint on
^
<sql-statement>
DROP TABLE attmp7;
</sql-statement>
<sql-statement>
DROP TABLE attmp6;
</sql-statement>
<sql-statement>
DROP TABLE attmp5;
</sql-statement>
<sql-statement>
DROP TABLE attmp4;
</sql-statement>
<sql-statement>
DROP TABLE attmp3;
</sql-statement>
<sql-statement>
DROP TABLE attmp2;
</sql-statement>
<sql-statement>
-- NOT VALID with plan invalidation -- ensure we don't use a constraint for
-- exclusion until validated
set constraint_exclusion TO 'partition';
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: VariableSetStmt, not supported name: constraint_exclusion
-- NOT VALID with plan invalidation -- ensure we don't use a constraint for
^
<sql-statement>
create table nv_parent (d date, check (false) no inherit not valid);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: table constraint not supported
create table nv_parent (d date, check (false) no inherit not valid);
^
<sql-statement>
-- not valid constraint added at creation time should automatically become valid
\d nv_parent
</sql-statement>
Metacommand \d nv_parent is not supported
<sql-statement>
create table nv_child_2010 () inherits (nv_parent);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: table inheritance not supported
create table nv_child_2010 () inherits (nv_parent);
^
<sql-statement>
create table nv_child_2011 () inherits (nv_parent);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: table inheritance not supported
create table nv_child_2011 () inherits (nv_parent);
^
<sql-statement>
alter table nv_child_2010 add check (d between '2010-01-01'::date and '2010-12-31'::date) not valid;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table nv_child_2010 add check (d between '2010-01-01'::date and '2010-12-31'::date) not valid;
^
<sql-statement>
alter table nv_child_2011 add check (d between '2011-01-01'::date and '2011-12-31'::date) not valid;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table nv_child_2011 add check (d between '2011-01-01'::date and '2011-12-31'::date) not valid;
^
<sql-statement>
explain (costs off) select * from nv_parent where d between '2011-08-01' and '2011-08-31';
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 276
explain (costs off) select * from nv_parent where d between '2011-08-01' and '2011-08-31';
^
<sql-statement>
create table nv_child_2009 (check (d between '2009-01-01'::date and '2009-12-31'::date)) inherits (nv_parent);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: table inheritance not supported
create table nv_child_2009 (check (d between '2009-01-01'::date and '2009-12-31'::date)) inherits (nv_parent);
^
<sql-statement>
explain (costs off) select * from nv_parent where d between '2011-08-01'::date and '2011-08-31'::date;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 276
explain (costs off) select * from nv_parent where d between '2011-08-01'::date and '2011-08-31'::date;
^
<sql-statement>
explain (costs off) select * from nv_parent where d between '2009-08-01'::date and '2009-08-31'::date;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 276
explain (costs off) select * from nv_parent where d between '2009-08-01'::date and '2009-08-31'::date;
^
<sql-statement>
-- after validation, the constraint should be used
alter table nv_child_2011 VALIDATE CONSTRAINT nv_child_2011_d_check;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- after validation, the constraint should be used
^
<sql-statement>
explain (costs off) select * from nv_parent where d between '2009-08-01'::date and '2009-08-31'::date;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 276
explain (costs off) select * from nv_parent where d between '2009-08-01'::date and '2009-08-31'::date;
^
<sql-statement>
-- add an inherited NOT VALID constraint
alter table nv_parent add check (d between '2001-01-01'::date and '2099-12-31'::date) not valid;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- add an inherited NOT VALID constraint
^
<sql-statement>
\d nv_child_2009
</sql-statement>
Metacommand \d nv_child_2009 is not supported
<sql-statement>
-- we leave nv_parent and children around to help test pg_dump logic
-- Foreign key adding test with mixed types
-- Note: these tables are TEMP to avoid name conflicts when this test
-- is run in parallel with foreign_key.sql.
CREATE TEMP TABLE PKTABLE (ptest1 int PRIMARY KEY);
</sql-statement>
<sql-statement>
INSERT INTO PKTABLE VALUES(42);
</sql-statement>
<sql-statement>
CREATE TEMP TABLE FKTABLE (ftest1 inet);
</sql-statement>
<sql-statement>
-- This next should fail, because int=inet does not exist
ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- This next should fail, because int=inet does not exist
^
<sql-statement>
-- This should also fail for the same reason, but here we
-- give the column name
ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable(ptest1);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- This should also fail for the same reason, but here we
^
<sql-statement>
DROP TABLE FKTABLE;
</sql-statement>
<sql-statement>
-- This should succeed, even though they are different types,
-- because int=int8 exists and is a member of the integer opfamily
CREATE TEMP TABLE FKTABLE (ftest1 int8);
</sql-statement>
<sql-statement>
ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable;
^
<sql-statement>
-- Check it actually works
INSERT INTO FKTABLE VALUES(42); -- should succeed
</sql-statement>
<sql-statement>
INSERT INTO FKTABLE VALUES(43); -- should fail
</sql-statement>
<sql-statement>
DROP TABLE FKTABLE;
</sql-statement>
<sql-statement>
-- This should fail, because we'd have to cast numeric to int which is
-- not an implicit coercion (or use numeric=numeric, but that's not part
-- of the integer opfamily)
CREATE TEMP TABLE FKTABLE (ftest1 numeric);
</sql-statement>
<sql-statement>
ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable;
^
<sql-statement>
DROP TABLE FKTABLE;
</sql-statement>
<sql-statement>
DROP TABLE PKTABLE;
</sql-statement>
<sql-statement>
-- On the other hand, this should work because int implicitly promotes to
-- numeric, and we allow promotion on the FK side
CREATE TEMP TABLE PKTABLE (ptest1 numeric PRIMARY KEY);
</sql-statement>
<sql-statement>
INSERT INTO PKTABLE VALUES(42);
</sql-statement>
<sql-statement>
CREATE TEMP TABLE FKTABLE (ftest1 int);
</sql-statement>
<sql-statement>
ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable;
^
<sql-statement>
-- Check it actually works
INSERT INTO FKTABLE VALUES(42); -- should succeed
</sql-statement>
<sql-statement>
INSERT INTO FKTABLE VALUES(43); -- should fail
</sql-statement>
<sql-statement>
DROP TABLE FKTABLE;
</sql-statement>
<sql-statement>
DROP TABLE PKTABLE;
</sql-statement>
<sql-statement>
CREATE TEMP TABLE PKTABLE (ptest1 int, ptest2 inet,
PRIMARY KEY(ptest1, ptest2));
</sql-statement>
<sql-statement>
-- This should fail, because we just chose really odd types
CREATE TEMP TABLE FKTABLE (ftest1 cidr, ftest2 timestamp);
</sql-statement>
<sql-statement>
ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2) references pktable;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2) references pktable;
^
<sql-statement>
DROP TABLE FKTABLE;
</sql-statement>
<sql-statement>
-- Again, so should this...
CREATE TEMP TABLE FKTABLE (ftest1 cidr, ftest2 timestamp);
</sql-statement>
<sql-statement>
ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2)
references pktable(ptest1, ptest2);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2)
^
<sql-statement>
DROP TABLE FKTABLE;
</sql-statement>
<sql-statement>
-- This fails because we mixed up the column ordering
CREATE TEMP TABLE FKTABLE (ftest1 int, ftest2 inet);
</sql-statement>
<sql-statement>
ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2)
references pktable(ptest2, ptest1);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2)
^
<sql-statement>
-- As does this...
ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest2, ftest1)
references pktable(ptest1, ptest2);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- As does this...
^
<sql-statement>
DROP TABLE FKTABLE;
</sql-statement>
<sql-statement>
DROP TABLE PKTABLE;
</sql-statement>
<sql-statement>
-- Test that ALTER CONSTRAINT updates trigger deferrability properly
CREATE TEMP TABLE PKTABLE (ptest1 int primary key);
</sql-statement>
<sql-statement>
CREATE TEMP TABLE FKTABLE (ftest1 int);
</sql-statement>
<sql-statement>
ALTER TABLE FKTABLE ADD CONSTRAINT fknd FOREIGN KEY(ftest1) REFERENCES pktable
ON DELETE CASCADE ON UPDATE NO ACTION NOT DEFERRABLE;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE FKTABLE ADD CONSTRAINT fknd FOREIGN KEY(ftest1) REFERENCES pktable
^
<sql-statement>
ALTER TABLE FKTABLE ADD CONSTRAINT fkdd FOREIGN KEY(ftest1) REFERENCES pktable
ON DELETE CASCADE ON UPDATE NO ACTION DEFERRABLE INITIALLY DEFERRED;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE FKTABLE ADD CONSTRAINT fkdd FOREIGN KEY(ftest1) REFERENCES pktable
^
<sql-statement>
ALTER TABLE FKTABLE ADD CONSTRAINT fkdi FOREIGN KEY(ftest1) REFERENCES pktable
ON DELETE CASCADE ON UPDATE NO ACTION DEFERRABLE INITIALLY IMMEDIATE;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE FKTABLE ADD CONSTRAINT fkdi FOREIGN KEY(ftest1) REFERENCES pktable
^
<sql-statement>
ALTER TABLE FKTABLE ADD CONSTRAINT fknd2 FOREIGN KEY(ftest1) REFERENCES pktable
ON DELETE CASCADE ON UPDATE NO ACTION DEFERRABLE INITIALLY DEFERRED;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE FKTABLE ADD CONSTRAINT fknd2 FOREIGN KEY(ftest1) REFERENCES pktable
^
<sql-statement>
ALTER TABLE FKTABLE ALTER CONSTRAINT fknd2 NOT DEFERRABLE;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE FKTABLE ALTER CONSTRAINT fknd2 NOT DEFERRABLE;
^
<sql-statement>
ALTER TABLE FKTABLE ADD CONSTRAINT fkdd2 FOREIGN KEY(ftest1) REFERENCES pktable
ON DELETE CASCADE ON UPDATE NO ACTION NOT DEFERRABLE;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE FKTABLE ADD CONSTRAINT fkdd2 FOREIGN KEY(ftest1) REFERENCES pktable
^
<sql-statement>
ALTER TABLE FKTABLE ALTER CONSTRAINT fkdd2 DEFERRABLE INITIALLY DEFERRED;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE FKTABLE ALTER CONSTRAINT fkdd2 DEFERRABLE INITIALLY DEFERRED;
^
<sql-statement>
ALTER TABLE FKTABLE ADD CONSTRAINT fkdi2 FOREIGN KEY(ftest1) REFERENCES pktable
ON DELETE CASCADE ON UPDATE NO ACTION NOT DEFERRABLE;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE FKTABLE ADD CONSTRAINT fkdi2 FOREIGN KEY(ftest1) REFERENCES pktable
^
<sql-statement>
ALTER TABLE FKTABLE ALTER CONSTRAINT fkdi2 DEFERRABLE INITIALLY IMMEDIATE;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
ALTER TABLE FKTABLE ALTER CONSTRAINT fkdi2 DEFERRABLE INITIALLY IMMEDIATE;
^
<sql-statement>
SELECT conname, tgfoid::regproc, tgtype, tgdeferrable, tginitdeferred
FROM pg_trigger JOIN pg_constraint con ON con.oid = tgconstraint
WHERE tgrelid = 'pktable'::regclass
ORDER BY 1,2,3;
</sql-statement>
-stdin-:<main>: Error: Type annotation
-stdin-:<main>:1:1: Error: At function: AssumeColumnOrder, At function: Sort
SELECT conname, tgfoid::regproc, tgtype, tgdeferrable, tginitdeferred
^
-stdin-:<main>:1:1: Error: Expected comparable type, but got: Tuple<pgname,pgregproc,pgint2>
SELECT conname, tgfoid::regproc, tgtype, tgdeferrable, tginitdeferred
^
<sql-statement>
SELECT conname, tgfoid::regproc, tgtype, tgdeferrable, tginitdeferred
FROM pg_trigger JOIN pg_constraint con ON con.oid = tgconstraint
WHERE tgrelid = 'fktable'::regclass
ORDER BY 1,2,3;
</sql-statement>
-stdin-:<main>: Error: Type annotation
-stdin-:<main>:1:1: Error: At function: AssumeColumnOrder, At function: Sort
SELECT conname, tgfoid::regproc, tgtype, tgdeferrable, tginitdeferred
^
-stdin-:<main>:1:1: Error: Expected comparable type, but got: Tuple<pgname,pgregproc,pgint2>
SELECT conname, tgfoid::regproc, tgtype, tgdeferrable, tginitdeferred
^
<sql-statement>
-- temp tables should go away by themselves, need not drop them.
-- test check constraint adding
create table atacc1 ( test int );
</sql-statement>
<sql-statement>
-- add a check constraint
alter table atacc1 add constraint atacc_test1 check (test>3);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- add a check constraint
^
<sql-statement>
-- should fail
insert into atacc1 (test) values (2);
</sql-statement>
<sql-statement>
-- should succeed
insert into atacc1 (test) values (4);
</sql-statement>
<sql-statement>
drop table atacc1;
</sql-statement>
<sql-statement>
-- let's do one where the check fails when added
create table atacc1 ( test int );
</sql-statement>
<sql-statement>
-- insert a soon to be failing row
insert into atacc1 (test) values (2);
</sql-statement>
<sql-statement>
-- add a check constraint (fails)
alter table atacc1 add constraint atacc_test1 check (test>3);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- add a check constraint (fails)
^
<sql-statement>
insert into atacc1 (test) values (4);
</sql-statement>
<sql-statement>
drop table atacc1;
</sql-statement>
<sql-statement>
-- let's do one where the check fails because the column doesn't exist
create table atacc1 ( test int );
</sql-statement>
<sql-statement>
-- add a check constraint (fails)
alter table atacc1 add constraint atacc_test1 check (test1>3);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- add a check constraint (fails)
^
<sql-statement>
drop table atacc1;
</sql-statement>
<sql-statement>
-- something a little more complicated
create table atacc1 ( test int, test2 int, test3 int);
</sql-statement>
<sql-statement>
-- add a check constraint (fails)
alter table atacc1 add constraint atacc_test1 check (test+test2<test3*4);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- add a check constraint (fails)
^
<sql-statement>
-- should fail
insert into atacc1 (test,test2,test3) values (4,4,2);
</sql-statement>
<sql-statement>
-- should succeed
insert into atacc1 (test,test2,test3) values (4,4,5);
</sql-statement>
<sql-statement>
drop table atacc1;
</sql-statement>
<sql-statement>
-- lets do some naming tests
create table atacc1 (test int check (test>3), test2 int);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: column constraint not supported
-- lets do some naming tests
^
<sql-statement>
alter table atacc1 add check (test2>test);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc1 add check (test2>test);
^
<sql-statement>
-- should fail for $2
insert into atacc1 (test2, test) values (3, 4);
</sql-statement>
-stdin-:<main>: Fatal: Table metadata loading
-stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.atacc1
<sql-statement>
drop table atacc1;
</sql-statement>
<sql-statement>
-- inheritance related tests
create table atacc1 (test int);
</sql-statement>
<sql-statement>
create table atacc2 (test2 int);
</sql-statement>
<sql-statement>
create table atacc3 (test3 int) inherits (atacc1, atacc2);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: table inheritance not supported
create table atacc3 (test3 int) inherits (atacc1, atacc2);
^
<sql-statement>
alter table atacc2 add constraint foo check (test2>0);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc2 add constraint foo check (test2>0);
^
<sql-statement>
-- fail and then succeed on atacc2
insert into atacc2 (test2) values (-3);
</sql-statement>
<sql-statement>
insert into atacc2 (test2) values (3);
</sql-statement>
<sql-statement>
-- fail and then succeed on atacc3
insert into atacc3 (test2) values (-3);
</sql-statement>
-stdin-:<main>: Fatal: Table metadata loading
-stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.atacc3
<sql-statement>
insert into atacc3 (test2) values (3);
</sql-statement>
-stdin-:<main>: Fatal: Table metadata loading
-stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.atacc3
<sql-statement>
drop table atacc3;
</sql-statement>
<sql-statement>
drop table atacc2;
</sql-statement>
<sql-statement>
drop table atacc1;
</sql-statement>
<sql-statement>
-- same things with one created with INHERIT
create table atacc1 (test int);
</sql-statement>
<sql-statement>
create table atacc2 (test2 int);
</sql-statement>
<sql-statement>
create table atacc3 (test3 int) inherits (atacc1, atacc2);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: table inheritance not supported
create table atacc3 (test3 int) inherits (atacc1, atacc2);
^
<sql-statement>
alter table atacc3 no inherit atacc2;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc3 no inherit atacc2;
^
<sql-statement>
-- fail
alter table atacc3 no inherit atacc2;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- fail
^
<sql-statement>
-- make sure it really isn't a child
insert into atacc3 (test2) values (3);
</sql-statement>
-stdin-:<main>: Fatal: Table metadata loading
-stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.atacc3
<sql-statement>
select test2 from atacc2;
</sql-statement>
<sql-statement>
-- fail due to missing constraint
alter table atacc2 add constraint foo check (test2>0);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- fail due to missing constraint
^
<sql-statement>
alter table atacc3 inherit atacc2;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc3 inherit atacc2;
^
<sql-statement>
-- fail due to missing column
alter table atacc3 rename test2 to testx;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 264
-- fail due to missing column
^
<sql-statement>
alter table atacc3 inherit atacc2;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc3 inherit atacc2;
^
<sql-statement>
-- fail due to mismatched data type
alter table atacc3 add test2 bool;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- fail due to mismatched data type
^
<sql-statement>
alter table atacc3 inherit atacc2;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc3 inherit atacc2;
^
<sql-statement>
alter table atacc3 drop test2;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc3 drop test2;
^
<sql-statement>
-- succeed
alter table atacc3 add test2 int;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- succeed
^
<sql-statement>
update atacc3 set test2 = 4 where test2 is null;
</sql-statement>
-stdin-:<main>: Fatal: Pre type annotation
-stdin-:<main>: Fatal: tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp:70: Key 'pg_update' not found in enum NYql::EYtSettingType. Valid options are: 'initial', 'infer_scheme', 'force_infer_schema', 'do_not_fail_on_invalid_schema', 'direct_read', 'view', 'mode', 'scheme', 'weak_concat', 'anonymous', 'with_qb', 'inline', 'sample', 'joinLabel', 'ignore_non_existing', 'warn_non_existing', 'xlock', 'unordered', 'nonUnique', 'userschema', 'usercolumns', 'statcolumns', 'syscolumns', 'ignoretypev3', 'memUsage', 'itemsCount', 'rowFactor', 'ordered', 'keyFilter', 'keyFilter2', 'take', 'skip', 'limit', 'sortLimitBy', 'sortBy', 'reduceBy', 'reduceFilterBy', 'forceTransform', 'weakFields', 'sharded', 'combineChunks', 'jobCount', 'joinReduce', 'firstAsPrimary', 'flow', 'keepSorted', 'keySwitch', 'uniqueBy', 'opHash', 'mapOutputType', 'reduceInputType', 'noDq', 'split', 'compression_codec', 'erasure_codec', 'expiration', 'replication_factor', 'user_attrs', 'media', 'primary_medium', 'keep_meta', 'monotonic_keys', 'mutationid'.
<sql-statement>
alter table atacc3 add constraint foo check (test2>0);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc3 add constraint foo check (test2>0);
^
<sql-statement>
alter table atacc3 inherit atacc2;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc3 inherit atacc2;
^
<sql-statement>
-- fail due to duplicates and circular inheritance
alter table atacc3 inherit atacc2;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- fail due to duplicates and circular inheritance
^
<sql-statement>
alter table atacc2 inherit atacc3;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc2 inherit atacc3;
^
<sql-statement>
alter table atacc2 inherit atacc2;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc2 inherit atacc2;
^
<sql-statement>
-- test that we really are a child now (should see 4 not 3 and cascade should go through)
select test2 from atacc2;
</sql-statement>
<sql-statement>
drop table atacc2 cascade;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: CASCADE is not implemented
drop table atacc2 cascade;
^
<sql-statement>
drop table atacc1;
</sql-statement>
<sql-statement>
-- adding only to a parent is allowed as of 9.2
create table atacc1 (test int);
</sql-statement>
<sql-statement>
create table atacc2 (test2 int) inherits (atacc1);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: table inheritance not supported
create table atacc2 (test2 int) inherits (atacc1);
^
<sql-statement>
-- ok:
alter table atacc1 add constraint foo check (test>0) no inherit;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- ok:
^
<sql-statement>
-- check constraint is not there on child
insert into atacc2 (test) values (-3);
</sql-statement>
<sql-statement>
-- check constraint is there on parent
insert into atacc1 (test) values (-3);
</sql-statement>
<sql-statement>
insert into atacc1 (test) values (3);
</sql-statement>
<sql-statement>
-- fail, violating row:
alter table atacc2 add constraint foo check (test>0) no inherit;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- fail, violating row:
^
<sql-statement>
drop table atacc2;
</sql-statement>
<sql-statement>
drop table atacc1;
</sql-statement>
<sql-statement>
-- test unique constraint adding
create table atacc1 ( test int ) ;
</sql-statement>
<sql-statement>
-- add a unique constraint
alter table atacc1 add constraint atacc_test1 unique (test);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- add a unique constraint
^
<sql-statement>
-- insert first value
insert into atacc1 (test) values (2);
</sql-statement>
<sql-statement>
-- should fail
insert into atacc1 (test) values (2);
</sql-statement>
<sql-statement>
-- should succeed
insert into atacc1 (test) values (4);
</sql-statement>
<sql-statement>
-- try to create duplicates via alter table using - should fail
alter table atacc1 alter column test type integer using 0;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- try to create duplicates via alter table using - should fail
^
<sql-statement>
drop table atacc1;
</sql-statement>
<sql-statement>
-- let's do one where the unique constraint fails when added
create table atacc1 ( test int );
</sql-statement>
<sql-statement>
-- insert soon to be failing rows
insert into atacc1 (test) values (2);
</sql-statement>
<sql-statement>
insert into atacc1 (test) values (2);
</sql-statement>
<sql-statement>
-- add a unique constraint (fails)
alter table atacc1 add constraint atacc_test1 unique (test);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- add a unique constraint (fails)
^
<sql-statement>
insert into atacc1 (test) values (3);
</sql-statement>
<sql-statement>
drop table atacc1;
</sql-statement>
<sql-statement>
-- let's do one where the unique constraint fails
-- because the column doesn't exist
create table atacc1 ( test int );
</sql-statement>
<sql-statement>
-- add a unique constraint (fails)
alter table atacc1 add constraint atacc_test1 unique (test1);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- add a unique constraint (fails)
^
<sql-statement>
drop table atacc1;
</sql-statement>
<sql-statement>
-- something a little more complicated
create table atacc1 ( test int, test2 int);
</sql-statement>
<sql-statement>
-- add a unique constraint
alter table atacc1 add constraint atacc_test1 unique (test, test2);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- add a unique constraint
^
<sql-statement>
-- insert initial value
insert into atacc1 (test,test2) values (4,4);
</sql-statement>
<sql-statement>
-- should fail
insert into atacc1 (test,test2) values (4,4);
</sql-statement>
<sql-statement>
-- should all succeed
insert into atacc1 (test,test2) values (4,5);
</sql-statement>
<sql-statement>
insert into atacc1 (test,test2) values (5,4);
</sql-statement>
<sql-statement>
insert into atacc1 (test,test2) values (5,5);
</sql-statement>
<sql-statement>
drop table atacc1;
</sql-statement>
<sql-statement>
-- lets do some naming tests
create table atacc1 (test int, test2 int, unique(test));
</sql-statement>
<sql-statement>
alter table atacc1 add unique (test2);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc1 add unique (test2);
^
<sql-statement>
-- should fail for @@ second one @@
insert into atacc1 (test2, test) values (3, 3);
</sql-statement>
<sql-statement>
insert into atacc1 (test2, test) values (2, 3);
</sql-statement>
<sql-statement>
drop table atacc1;
</sql-statement>
<sql-statement>
-- test primary key constraint adding
create table atacc1 ( id serial, test int) ;
</sql-statement>
<sql-statement>
-- add a primary key constraint
alter table atacc1 add constraint atacc_test1 primary key (test);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- add a primary key constraint
^
<sql-statement>
-- insert first value
insert into atacc1 (test) values (2);
</sql-statement>
<sql-statement>
-- should fail
insert into atacc1 (test) values (2);
</sql-statement>
<sql-statement>
-- should succeed
insert into atacc1 (test) values (4);
</sql-statement>
<sql-statement>
-- inserting NULL should fail
insert into atacc1 (test) values(NULL);
</sql-statement>
<sql-statement>
-- try adding a second primary key (should fail)
alter table atacc1 add constraint atacc_oid1 primary key(id);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- try adding a second primary key (should fail)
^
<sql-statement>
-- drop first primary key constraint
alter table atacc1 drop constraint atacc_test1 restrict;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- drop first primary key constraint
^
<sql-statement>
-- try adding a primary key on oid (should succeed)
alter table atacc1 add constraint atacc_oid1 primary key(id);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- try adding a primary key on oid (should succeed)
^
<sql-statement>
drop table atacc1;
</sql-statement>
<sql-statement>
-- let's do one where the primary key constraint fails when added
create table atacc1 ( test int );
</sql-statement>
<sql-statement>
-- insert soon to be failing rows
insert into atacc1 (test) values (2);
</sql-statement>
<sql-statement>
insert into atacc1 (test) values (2);
</sql-statement>
<sql-statement>
-- add a primary key (fails)
alter table atacc1 add constraint atacc_test1 primary key (test);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- add a primary key (fails)
^
<sql-statement>
insert into atacc1 (test) values (3);
</sql-statement>
<sql-statement>
drop table atacc1;
</sql-statement>
<sql-statement>
-- let's do another one where the primary key constraint fails when added
create table atacc1 ( test int );
</sql-statement>
<sql-statement>
-- insert soon to be failing row
insert into atacc1 (test) values (NULL);
</sql-statement>
<sql-statement>
-- add a primary key (fails)
alter table atacc1 add constraint atacc_test1 primary key (test);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- add a primary key (fails)
^
<sql-statement>
insert into atacc1 (test) values (3);
</sql-statement>
<sql-statement>
drop table atacc1;
</sql-statement>
<sql-statement>
-- let's do one where the primary key constraint fails
-- because the column doesn't exist
create table atacc1 ( test int );
</sql-statement>
<sql-statement>
-- add a primary key constraint (fails)
alter table atacc1 add constraint atacc_test1 primary key (test1);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- add a primary key constraint (fails)
^
<sql-statement>
drop table atacc1;
</sql-statement>
<sql-statement>
-- adding a new column as primary key to a non-empty table.
-- should fail unless the column has a non-null default value.
create table atacc1 ( test int );
</sql-statement>
<sql-statement>
insert into atacc1 (test) values (0);
</sql-statement>
<sql-statement>
-- add a primary key column without a default (fails).
alter table atacc1 add column test2 int primary key;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- add a primary key column without a default (fails).
^
<sql-statement>
-- now add a primary key column with a default (succeeds).
alter table atacc1 add column test2 int default 0 primary key;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- now add a primary key column with a default (succeeds).
^
<sql-statement>
drop table atacc1;
</sql-statement>
<sql-statement>
-- this combination used to have order-of-execution problems (bug #15580)
create table atacc1 (a int);
</sql-statement>
<sql-statement>
insert into atacc1 values(1);
</sql-statement>
<sql-statement>
alter table atacc1
add column b float8 not null default random(),
add primary key(a);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc1
^
<sql-statement>
drop table atacc1;
</sql-statement>
<sql-statement>
-- additionally, we've seen issues with foreign key validation not being
-- properly delayed until after a table rewrite. Check that works ok.
create table atacc1 (a int primary key);
</sql-statement>
<sql-statement>
alter table atacc1 add constraint atacc1_fkey foreign key (a) references atacc1 (a) not valid;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc1 add constraint atacc1_fkey foreign key (a) references atacc1 (a) not valid;
^
<sql-statement>
alter table atacc1 validate constraint atacc1_fkey, alter a type bigint;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc1 validate constraint atacc1_fkey, alter a type bigint;
^
<sql-statement>
drop table atacc1;
</sql-statement>
<sql-statement>
-- we've also seen issues with check constraints being validated at the wrong
-- time when there's a pending table rewrite.
create table atacc1 (a bigint, b int);
</sql-statement>
<sql-statement>
insert into atacc1 values(1,1);
</sql-statement>
<sql-statement>
alter table atacc1 add constraint atacc1_chk check(b = 1) not valid;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc1 add constraint atacc1_chk check(b = 1) not valid;
^
<sql-statement>
alter table atacc1 validate constraint atacc1_chk, alter a type int;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc1 validate constraint atacc1_chk, alter a type int;
^
<sql-statement>
drop table atacc1;
</sql-statement>
<sql-statement>
-- same as above, but ensure the constraint violation is detected
create table atacc1 (a bigint, b int);
</sql-statement>
<sql-statement>
insert into atacc1 values(1,2);
</sql-statement>
<sql-statement>
alter table atacc1 add constraint atacc1_chk check(b = 1) not valid;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc1 add constraint atacc1_chk check(b = 1) not valid;
^
<sql-statement>
alter table atacc1 validate constraint atacc1_chk, alter a type int;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc1 validate constraint atacc1_chk, alter a type int;
^
<sql-statement>
drop table atacc1;
</sql-statement>
<sql-statement>
-- something a little more complicated
create table atacc1 ( test int, test2 int);
</sql-statement>
<sql-statement>
-- add a primary key constraint
alter table atacc1 add constraint atacc_test1 primary key (test, test2);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- add a primary key constraint
^
<sql-statement>
-- try adding a second primary key - should fail
alter table atacc1 add constraint atacc_test2 primary key (test);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- try adding a second primary key - should fail
^
<sql-statement>
-- insert initial value
insert into atacc1 (test,test2) values (4,4);
</sql-statement>
<sql-statement>
-- should fail
insert into atacc1 (test,test2) values (4,4);
</sql-statement>
<sql-statement>
insert into atacc1 (test,test2) values (NULL,3);
</sql-statement>
<sql-statement>
insert into atacc1 (test,test2) values (3, NULL);
</sql-statement>
<sql-statement>
insert into atacc1 (test,test2) values (NULL,NULL);
</sql-statement>
<sql-statement>
-- should all succeed
insert into atacc1 (test,test2) values (4,5);
</sql-statement>
<sql-statement>
insert into atacc1 (test,test2) values (5,4);
</sql-statement>
<sql-statement>
insert into atacc1 (test,test2) values (5,5);
</sql-statement>
<sql-statement>
drop table atacc1;
</sql-statement>
<sql-statement>
-- lets do some naming tests
create table atacc1 (test int, test2 int, primary key(test));
</sql-statement>
<sql-statement>
-- only first should succeed
insert into atacc1 (test2, test) values (3, 3);
</sql-statement>
<sql-statement>
insert into atacc1 (test2, test) values (2, 3);
</sql-statement>
<sql-statement>
insert into atacc1 (test2, test) values (1, NULL);
</sql-statement>
<sql-statement>
drop table atacc1;
</sql-statement>
<sql-statement>
-- alter table / alter column [set/drop] not null tests
-- try altering system catalogs, should fail
alter table pg_class alter column relname drop not null;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- alter table / alter column [set/drop] not null tests
^
<sql-statement>
alter table pg_class alter relname set not null;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table pg_class alter relname set not null;
^
<sql-statement>
-- try altering non-existent table, should fail
alter table non_existent alter column bar set not null;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- try altering non-existent table, should fail
^
<sql-statement>
alter table non_existent alter column bar drop not null;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table non_existent alter column bar drop not null;
^
<sql-statement>
-- test setting columns to null and not null and vice versa
-- test checking for null values and primary key
create table atacc1 (test int not null);
</sql-statement>
<sql-statement>
alter table atacc1 add constraint "atacc1_pkey" primary key (test);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc1 add constraint "atacc1_pkey" primary key (test);
^
<sql-statement>
alter table atacc1 alter column test drop not null;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc1 alter column test drop not null;
^
<sql-statement>
alter table atacc1 drop constraint "atacc1_pkey";
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc1 drop constraint "atacc1_pkey";
^
<sql-statement>
alter table atacc1 alter column test drop not null;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc1 alter column test drop not null;
^
<sql-statement>
insert into atacc1 values (null);
</sql-statement>
<sql-statement>
alter table atacc1 alter test set not null;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc1 alter test set not null;
^
<sql-statement>
delete from atacc1;
</sql-statement>
-stdin-:<main>: Fatal: Pre type annotation
-stdin-:<main>: Fatal: tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp:70: Key 'pg_delete' not found in enum NYql::EYtSettingType. Valid options are: 'initial', 'infer_scheme', 'force_infer_schema', 'do_not_fail_on_invalid_schema', 'direct_read', 'view', 'mode', 'scheme', 'weak_concat', 'anonymous', 'with_qb', 'inline', 'sample', 'joinLabel', 'ignore_non_existing', 'warn_non_existing', 'xlock', 'unordered', 'nonUnique', 'userschema', 'usercolumns', 'statcolumns', 'syscolumns', 'ignoretypev3', 'memUsage', 'itemsCount', 'rowFactor', 'ordered', 'keyFilter', 'keyFilter2', 'take', 'skip', 'limit', 'sortLimitBy', 'sortBy', 'reduceBy', 'reduceFilterBy', 'forceTransform', 'weakFields', 'sharded', 'combineChunks', 'jobCount', 'joinReduce', 'firstAsPrimary', 'flow', 'keepSorted', 'keySwitch', 'uniqueBy', 'opHash', 'mapOutputType', 'reduceInputType', 'noDq', 'split', 'compression_codec', 'erasure_codec', 'expiration', 'replication_factor', 'user_attrs', 'media', 'primary_medium', 'keep_meta', 'monotonic_keys', 'mutationid'.
<sql-statement>
alter table atacc1 alter test set not null;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc1 alter test set not null;
^
<sql-statement>
-- try altering a non-existent column, should fail
alter table atacc1 alter bar set not null;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- try altering a non-existent column, should fail
^
<sql-statement>
alter table atacc1 alter bar drop not null;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc1 alter bar drop not null;
^
<sql-statement>
-- try creating a view and altering that, should fail
create view myview as select * from atacc1;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: expected at least one target column
-- try creating a view and altering that, should fail
^
<sql-statement>
alter table myview alter column test drop not null;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table myview alter column test drop not null;
^
<sql-statement>
alter table myview alter column test set not null;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table myview alter column test set not null;
^
<sql-statement>
drop view myview;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: View not found: 'myview'
drop view myview;
^
<sql-statement>
drop table atacc1;
</sql-statement>
<sql-statement>
-- set not null verified by constraints
create table atacc1 (test_a int, test_b int);
</sql-statement>
<sql-statement>
insert into atacc1 values (null, 1);
</sql-statement>
<sql-statement>
-- constraint not cover all values, should fail
alter table atacc1 add constraint atacc1_constr_or check(test_a is not null or test_b < 10);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- constraint not cover all values, should fail
^
<sql-statement>
alter table atacc1 alter test_a set not null;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc1 alter test_a set not null;
^
<sql-statement>
alter table atacc1 drop constraint atacc1_constr_or;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc1 drop constraint atacc1_constr_or;
^
<sql-statement>
-- not valid constraint, should fail
alter table atacc1 add constraint atacc1_constr_invalid check(test_a is not null) not valid;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- not valid constraint, should fail
^
<sql-statement>
alter table atacc1 alter test_a set not null;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc1 alter test_a set not null;
^
<sql-statement>
alter table atacc1 drop constraint atacc1_constr_invalid;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc1 drop constraint atacc1_constr_invalid;
^
<sql-statement>
-- with valid constraint
update atacc1 set test_a = 1;
</sql-statement>
-stdin-:<main>: Fatal: Pre type annotation
-stdin-:<main>: Fatal: tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp:70: Key 'pg_update' not found in enum NYql::EYtSettingType. Valid options are: 'initial', 'infer_scheme', 'force_infer_schema', 'do_not_fail_on_invalid_schema', 'direct_read', 'view', 'mode', 'scheme', 'weak_concat', 'anonymous', 'with_qb', 'inline', 'sample', 'joinLabel', 'ignore_non_existing', 'warn_non_existing', 'xlock', 'unordered', 'nonUnique', 'userschema', 'usercolumns', 'statcolumns', 'syscolumns', 'ignoretypev3', 'memUsage', 'itemsCount', 'rowFactor', 'ordered', 'keyFilter', 'keyFilter2', 'take', 'skip', 'limit', 'sortLimitBy', 'sortBy', 'reduceBy', 'reduceFilterBy', 'forceTransform', 'weakFields', 'sharded', 'combineChunks', 'jobCount', 'joinReduce', 'firstAsPrimary', 'flow', 'keepSorted', 'keySwitch', 'uniqueBy', 'opHash', 'mapOutputType', 'reduceInputType', 'noDq', 'split', 'compression_codec', 'erasure_codec', 'expiration', 'replication_factor', 'user_attrs', 'media', 'primary_medium', 'keep_meta', 'monotonic_keys', 'mutationid'.
<sql-statement>
alter table atacc1 add constraint atacc1_constr_a_valid check(test_a is not null);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc1 add constraint atacc1_constr_a_valid check(test_a is not null);
^
<sql-statement>
alter table atacc1 alter test_a set not null;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc1 alter test_a set not null;
^
<sql-statement>
delete from atacc1;
</sql-statement>
-stdin-:<main>: Fatal: Pre type annotation
-stdin-:<main>: Fatal: tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp:70: Key 'pg_delete' not found in enum NYql::EYtSettingType. Valid options are: 'initial', 'infer_scheme', 'force_infer_schema', 'do_not_fail_on_invalid_schema', 'direct_read', 'view', 'mode', 'scheme', 'weak_concat', 'anonymous', 'with_qb', 'inline', 'sample', 'joinLabel', 'ignore_non_existing', 'warn_non_existing', 'xlock', 'unordered', 'nonUnique', 'userschema', 'usercolumns', 'statcolumns', 'syscolumns', 'ignoretypev3', 'memUsage', 'itemsCount', 'rowFactor', 'ordered', 'keyFilter', 'keyFilter2', 'take', 'skip', 'limit', 'sortLimitBy', 'sortBy', 'reduceBy', 'reduceFilterBy', 'forceTransform', 'weakFields', 'sharded', 'combineChunks', 'jobCount', 'joinReduce', 'firstAsPrimary', 'flow', 'keepSorted', 'keySwitch', 'uniqueBy', 'opHash', 'mapOutputType', 'reduceInputType', 'noDq', 'split', 'compression_codec', 'erasure_codec', 'expiration', 'replication_factor', 'user_attrs', 'media', 'primary_medium', 'keep_meta', 'monotonic_keys', 'mutationid'.
<sql-statement>
insert into atacc1 values (2, null);
</sql-statement>
<sql-statement>
alter table atacc1 alter test_a drop not null;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc1 alter test_a drop not null;
^
<sql-statement>
-- test multiple set not null at same time
-- test_a checked by atacc1_constr_a_valid, test_b should fail by table scan
alter table atacc1 alter test_a set not null, alter test_b set not null;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- test multiple set not null at same time
^
<sql-statement>
-- commands order has no importance
alter table atacc1 alter test_b set not null, alter test_a set not null;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- commands order has no importance
^
<sql-statement>
-- valid one by table scan, one by check constraints
update atacc1 set test_b = 1;
</sql-statement>
-stdin-:<main>: Fatal: Pre type annotation
-stdin-:<main>: Fatal: tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp:70: Key 'pg_update' not found in enum NYql::EYtSettingType. Valid options are: 'initial', 'infer_scheme', 'force_infer_schema', 'do_not_fail_on_invalid_schema', 'direct_read', 'view', 'mode', 'scheme', 'weak_concat', 'anonymous', 'with_qb', 'inline', 'sample', 'joinLabel', 'ignore_non_existing', 'warn_non_existing', 'xlock', 'unordered', 'nonUnique', 'userschema', 'usercolumns', 'statcolumns', 'syscolumns', 'ignoretypev3', 'memUsage', 'itemsCount', 'rowFactor', 'ordered', 'keyFilter', 'keyFilter2', 'take', 'skip', 'limit', 'sortLimitBy', 'sortBy', 'reduceBy', 'reduceFilterBy', 'forceTransform', 'weakFields', 'sharded', 'combineChunks', 'jobCount', 'joinReduce', 'firstAsPrimary', 'flow', 'keepSorted', 'keySwitch', 'uniqueBy', 'opHash', 'mapOutputType', 'reduceInputType', 'noDq', 'split', 'compression_codec', 'erasure_codec', 'expiration', 'replication_factor', 'user_attrs', 'media', 'primary_medium', 'keep_meta', 'monotonic_keys', 'mutationid'.
<sql-statement>
alter table atacc1 alter test_b set not null, alter test_a set not null;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc1 alter test_b set not null, alter test_a set not null;
^
<sql-statement>
alter table atacc1 alter test_a drop not null, alter test_b drop not null;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc1 alter test_a drop not null, alter test_b drop not null;
^
<sql-statement>
-- both column has check constraints
alter table atacc1 add constraint atacc1_constr_b_valid check(test_b is not null);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
-- both column has check constraints
^
<sql-statement>
alter table atacc1 alter test_b set not null, alter test_a set not null;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table atacc1 alter test_b set not null, alter test_a set not null;
^
<sql-statement>
drop table atacc1;
</sql-statement>
<sql-statement>
-- test inheritance
create table parent (a int);
</sql-statement>
<sql-statement>
create table child (b varchar(255)) inherits (parent);
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: table inheritance not supported
create table child (b varchar(255)) inherits (parent);
^
<sql-statement>
alter table parent alter a set not null;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table parent alter a set not null;
^
<sql-statement>
insert into parent values (NULL);
</sql-statement>
<sql-statement>
insert into child (a, b) values (NULL, 'foo');
</sql-statement>
-stdin-:<main>: Fatal: Table metadata loading
-stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.child
<sql-statement>
alter table parent alter a drop not null;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table parent alter a drop not null;
^
<sql-statement>
insert into parent values (NULL);
</sql-statement>
<sql-statement>
insert into child (a, b) values (NULL, 'foo');
</sql-statement>
-stdin-:<main>: Fatal: Table metadata loading
-stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.child
<sql-statement>
alter table only parent alter a set not null;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table only parent alter a set not null;
^
<sql-statement>
alter table child alter a set not null;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table child alter a set not null;
^
<sql-statement>
delete from parent;
</sql-statement>
-stdin-:<main>: Fatal: Pre type annotation
-stdin-:<main>: Fatal: tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp:70: Key 'pg_delete' not found in enum NYql::EYtSettingType. Valid options are: 'initial', 'infer_scheme', 'force_infer_schema', 'do_not_fail_on_invalid_schema', 'direct_read', 'view', 'mode', 'scheme', 'weak_concat', 'anonymous', 'with_qb', 'inline', 'sample', 'joinLabel', 'ignore_non_existing', 'warn_non_existing', 'xlock', 'unordered', 'nonUnique', 'userschema', 'usercolumns', 'statcolumns', 'syscolumns', 'ignoretypev3', 'memUsage', 'itemsCount', 'rowFactor', 'ordered', 'keyFilter', 'keyFilter2', 'take', 'skip', 'limit', 'sortLimitBy', 'sortBy', 'reduceBy', 'reduceFilterBy', 'forceTransform', 'weakFields', 'sharded', 'combineChunks', 'jobCount', 'joinReduce', 'firstAsPrimary', 'flow', 'keepSorted', 'keySwitch', 'uniqueBy', 'opHash', 'mapOutputType', 'reduceInputType', 'noDq', 'split', 'compression_codec', 'erasure_codec', 'expiration', 'replication_factor', 'user_attrs', 'media', 'primary_medium', 'keep_meta', 'monotonic_keys', 'mutationid'.
<sql-statement>
alter table only parent alter a set not null;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table only parent alter a set not null;
^
<sql-statement>
insert into parent values (NULL);
</sql-statement>
<sql-statement>
alter table child alter a set not null;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table child alter a set not null;
^
<sql-statement>
insert into child (a, b) values (NULL, 'foo');
</sql-statement>
-stdin-:<main>: Fatal: Table metadata loading
-stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.child
<sql-statement>
delete from child;
</sql-statement>
-stdin-:<main>: Fatal: Pre type annotation
-stdin-:<main>: Fatal: tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp:70: Key 'pg_delete' not found in enum NYql::EYtSettingType. Valid options are: 'initial', 'infer_scheme', 'force_infer_schema', 'do_not_fail_on_invalid_schema', 'direct_read', 'view', 'mode', 'scheme', 'weak_concat', 'anonymous', 'with_qb', 'inline', 'sample', 'joinLabel', 'ignore_non_existing', 'warn_non_existing', 'xlock', 'unordered', 'nonUnique', 'userschema', 'usercolumns', 'statcolumns', 'syscolumns', 'ignoretypev3', 'memUsage', 'itemsCount', 'rowFactor', 'ordered', 'keyFilter', 'keyFilter2', 'take', 'skip', 'limit', 'sortLimitBy', 'sortBy', 'reduceBy', 'reduceFilterBy', 'forceTransform', 'weakFields', 'sharded', 'combineChunks', 'jobCount', 'joinReduce', 'firstAsPrimary', 'flow', 'keepSorted', 'keySwitch', 'uniqueBy', 'opHash', 'mapOutputType', 'reduceInputType', 'noDq', 'split', 'compression_codec', 'erasure_codec', 'expiration', 'replication_factor', 'user_attrs', 'media', 'primary_medium', 'keep_meta', 'monotonic_keys', 'mutationid'.
<sql-statement>
alter table child alter a set not null;
</sql-statement>
-stdin-:<main>: Error: Parse Sql
-stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
alter table child alter a set not null;
^
<sql-statement>
insert into child (a, b) values (NULL, 'foo');
</sql-statement>
-stdin-:<main>: Fatal: Table metadata loading
-stdin-:<main>: Fatal: ydb/library/yql/providers/yt/gateway/file/yql_yt_file_services.cpp:44: Table not found: plato.child
<sql-statement>
drop table child;
</sql-statement>
<sql-statement>
drop table parent;
</sql-statement>
<sql-statement>
-- test setting and removing default values
create table def_test (
c1 int4 default 5,
c2 text default 'initial_default'
);
</sql-statement>
<sql-statement>
insert into def_test default values;
</sql-statement>
-stdin-:<main>: Fatal: tools/enum_parser/enum_serialization_runtime/enum_runtime.cpp:70: Key 'default_values' not found in enum NYql::EYtSettingType. Valid options are: 'initial', 'infer_scheme', 'force_infer_schema', 'do_not_fail_on_invalid_schema', 'direct_read', 'view', 'mode', 'scheme', 'weak_concat', 'anonymous', 'with_qb', 'inline', 'sample', 'joinLabel', 'ignore_non_existing', 'warn_non_existing', 'xlock', 'unordered', 'nonUnique', 'userschema', 'usercolumns', 'statcolumns', 'syscolumns', 'ignoretypev3', 'memUsage', 'itemsCount', 'rowFactor', 'ordered', 'keyFilter', 'keyFilter2', 'take', 'skip', 'limit', 'sortLimitBy', 'sortBy', 'reduceBy', 'reduceFilterBy', 'forceTransform', 'weakFields', 'sharded', 'combineChunks', 'jobCount', 'joinReduce', 'firstAsPrimary', 'flow', 'keepSorted', 'keySwitch', 'uniqueBy', 'opHash', 'mapOutputType', 'reduceInputType', 'noDq', 'split', 'compression_codec', 'erasure_codec', 'expiration', 'replication_factor', 'user_attrs', 'media', 'primary_medium', 'keep_meta', 'monotonic_keys', 'mutationid'.
<sql-statement>
alter table def_test alter column c1 drop default;
</sql-statement>
NSQLTranslationPG::TConverter::ParseAlterTableStmt(AlterTableStmt const*) at /-S/ydb/library/yql/sql/pg/pg_sql.cpp:2904:0
NSQLTranslationPG::TConverter::ParseRawStmt(RawStmt const*) at /-S/ydb/library/yql/sql/pg/pg_sql.cpp:510:0
NSQLTranslationPG::TConverter::ParseResult(List const*, TMaybe<unsigned int, NMaybe::TPolicyUndefinedExcept>) at /-S/ydb/library/yql/sql/pg/pg_sql.cpp:393:0
NSQLTranslationPG::TConverter::OnResult(List const*) at /-S/ydb/library/yql/sql/pg/pg_sql.cpp:351:0
NYql::PGParse(TBasicString<char, std::__y1::char_traits<char>> const&, NYql::IPGParseEvents&) at /-S/ydb/library/yql/parser/pg_wrapper/parser.cpp:217:0
NSQLTranslationPG::PGToYql(TBasicString<char, std::__y1::char_traits<char>> const&, NSQLTranslation::TTranslationSettings const&, NYql::TStmtParseInfo*) at /-S/ydb/library/yql/sql/pg/pg_sql.cpp:5109:0
NSQLTranslation::SqlToYql(TBasicString<char, std::__y1::char_traits<char>> const&, NSQLTranslation::TTranslationSettings const&, TVector<NYql::TWarningRule, std::__y1::allocator<NYql::TWarningRule>>*, NYql::TStmtParseInfo*) at /-S/ydb/library/yql/sql/sql.cpp:38:0
NYql::TProgram::ParseSql(NSQLTranslation::TTranslationSettings const&) at /-S/ydb/library/yql/core/facade/yql_facade.cpp:658:0
Main(int, char**) at /-S/ydb/library/yql/tools/pgrun/pgrun.cpp:1239:0
main at /-S/ydb/library/yql/tools/pgrun/pgrun.cpp:1341:0
__libc_start_call_main at ../sysdeps/nptl/libc_start_call_main.h:58:0
__libc_start_main_impl at ../csu/libc-start.c:392:0
??? at ???:0:0
|