123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898 |
- <sql-statement>
- --
- -- CREATE_TABLE
- --
- --
- -- CLASS DEFINITIONS
- --
- CREATE TABLE hobbies_r (
- name text,
- person text
- );
- </sql-statement>
- <sql-statement>
- CREATE TABLE equipment_r (
- name text,
- hobby text
- );
- </sql-statement>
- <sql-statement>
- CREATE TABLE onek (
- unique1 int4,
- unique2 int4,
- two int4,
- four int4,
- ten int4,
- twenty int4,
- hundred int4,
- thousand int4,
- twothousand int4,
- fivethous int4,
- tenthous int4,
- odd int4,
- even int4,
- stringu1 name,
- stringu2 name,
- string4 name
- );
- </sql-statement>
- <sql-statement>
- CREATE TABLE tenk1 (
- unique1 int4,
- unique2 int4,
- two int4,
- four int4,
- ten int4,
- twenty int4,
- hundred int4,
- thousand int4,
- twothousand int4,
- fivethous int4,
- tenthous int4,
- odd int4,
- even int4,
- stringu1 name,
- stringu2 name,
- string4 name
- );
- </sql-statement>
- <sql-statement>
- CREATE TABLE tenk2 (
- unique1 int4,
- unique2 int4,
- two int4,
- four int4,
- ten int4,
- twenty int4,
- hundred int4,
- thousand int4,
- twothousand int4,
- fivethous int4,
- tenthous int4,
- odd int4,
- even int4,
- stringu1 name,
- stringu2 name,
- string4 name
- );
- </sql-statement>
- <sql-statement>
- CREATE TABLE person (
- name text,
- age int4,
- location point
- );
- </sql-statement>
- <sql-statement>
- CREATE TABLE emp (
- salary int4,
- manager name
- ) INHERITS (person);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE emp (
- ^
- <sql-statement>
- CREATE TABLE student (
- gpa float8
- ) INHERITS (person);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE student (
- ^
- <sql-statement>
- CREATE TABLE stud_emp (
- percent int4
- ) INHERITS (emp, student);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE stud_emp (
- ^
- <sql-statement>
- CREATE TABLE city (
- name name,
- location box,
- budget city_budget
- );
- </sql-statement>
- <sql-statement>
- CREATE TABLE dept (
- dname name,
- mgrname text
- );
- </sql-statement>
- <sql-statement>
- CREATE TABLE slow_emp4000 (
- home_base box
- );
- </sql-statement>
- <sql-statement>
- CREATE TABLE fast_emp4000 (
- home_base box
- );
- </sql-statement>
- <sql-statement>
- CREATE TABLE road (
- name text,
- thepath path
- );
- </sql-statement>
- <sql-statement>
- CREATE TABLE ihighway () INHERITS (road);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE ihighway () INHERITS (road);
- ^
- <sql-statement>
- CREATE TABLE shighway (
- surface text
- ) INHERITS (road);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE shighway (
- ^
- <sql-statement>
- CREATE TABLE real_city (
- pop int4,
- cname text,
- outline path
- );
- </sql-statement>
- <sql-statement>
- --
- -- test the "star" operators a bit more thoroughly -- this time,
- -- throw in lots of NULL fields...
- --
- -- a is the type root
- -- b and c inherit from a (one-level single inheritance)
- -- d inherits from b and c (two-level multiple inheritance)
- -- e inherits from c (two-level single inheritance)
- -- f inherits from e (three-level single inheritance)
- --
- CREATE TABLE a_star (
- class char,
- a int4
- );
- </sql-statement>
- <sql-statement>
- CREATE TABLE b_star (
- b text
- ) INHERITS (a_star);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE b_star (
- ^
- <sql-statement>
- CREATE TABLE c_star (
- c name
- ) INHERITS (a_star);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE c_star (
- ^
- <sql-statement>
- CREATE TABLE d_star (
- d float8
- ) INHERITS (b_star, c_star);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE d_star (
- ^
- <sql-statement>
- CREATE TABLE e_star (
- e int2
- ) INHERITS (c_star);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE e_star (
- ^
- <sql-statement>
- CREATE TABLE f_star (
- f polygon
- ) INHERITS (e_star);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE f_star (
- ^
- <sql-statement>
- CREATE TABLE aggtest (
- a int2,
- b float4
- );
- </sql-statement>
- <sql-statement>
- CREATE TABLE hash_i4_heap (
- seqno int4,
- random int4
- );
- </sql-statement>
- <sql-statement>
- CREATE TABLE hash_name_heap (
- seqno int4,
- random name
- );
- </sql-statement>
- <sql-statement>
- CREATE TABLE hash_txt_heap (
- seqno int4,
- random text
- );
- </sql-statement>
- <sql-statement>
- CREATE TABLE hash_f8_heap (
- seqno int4,
- random float8
- );
- </sql-statement>
- <sql-statement>
- -- don't include the hash_ovfl_heap stuff in the distribution
- -- the data set is too large for what it's worth
- --
- -- CREATE TABLE hash_ovfl_heap (
- -- x int4,
- -- y int4
- -- );
- CREATE TABLE bt_i4_heap (
- seqno int4,
- random int4
- );
- </sql-statement>
- <sql-statement>
- CREATE TABLE bt_name_heap (
- seqno name,
- random int4
- );
- </sql-statement>
- <sql-statement>
- CREATE TABLE bt_txt_heap (
- seqno text,
- random int4
- );
- </sql-statement>
- <sql-statement>
- CREATE TABLE bt_f8_heap (
- seqno float8,
- random int4
- );
- </sql-statement>
- <sql-statement>
- CREATE TABLE array_op_test (
- seqno int4,
- i int4[],
- t text[]
- );
- </sql-statement>
- <sql-statement>
- CREATE TABLE array_index_op_test (
- seqno int4,
- i int4[],
- t text[]
- );
- </sql-statement>
- <sql-statement>
- CREATE TABLE testjsonb (
- j jsonb
- );
- </sql-statement>
- <sql-statement>
- CREATE TABLE unknowntab (
- u unknown -- fail
- );
- </sql-statement>
- <sql-statement>
- CREATE TYPE unknown_comptype AS (
- u unknown -- fail
- );
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 314
- CREATE TYPE unknown_comptype AS (
- ^
- <sql-statement>
- CREATE TABLE IF NOT EXISTS test_tsvector(
- t text,
- a tsvector
- );
- </sql-statement>
- <sql-statement>
- CREATE TABLE IF NOT EXISTS test_tsvector(
- t text
- );
- </sql-statement>
- <sql-statement>
- -- invalid: non-lowercase quoted reloptions identifiers
- CREATE TABLE tas_case WITH ("Fillfactor" = 10) AS SELECT 1 a;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 277
- -- invalid: non-lowercase quoted reloptions identifiers
- ^
- <sql-statement>
- CREATE TEMP TABLE explicitly_temp (a int primary key); -- also OK
- </sql-statement>
- <sql-statement>
- CREATE TABLE as_select1 AS SELECT * FROM pg_class WHERE relkind = 'r';
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 277
- CREATE TABLE as_select1 AS SELECT * FROM pg_class WHERE relkind = 'r';
- ^
- <sql-statement>
- CREATE TABLE as_select1 AS SELECT * FROM pg_class WHERE relkind = 'r';
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 277
- CREATE TABLE as_select1 AS SELECT * FROM pg_class WHERE relkind = 'r';
- ^
- <sql-statement>
- CREATE TABLE IF NOT EXISTS as_select1 AS SELECT * FROM pg_class WHERE relkind = 'r';
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 277
- CREATE TABLE IF NOT EXISTS as_select1 AS SELECT * FROM pg_class WHERE relkind = 'r';
- ^
- <sql-statement>
- DROP TABLE as_select1;
- </sql-statement>
- <sql-statement>
- PREPARE select1 AS SELECT 1 as a;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 301
- PREPARE select1 AS SELECT 1 as a;
- ^
- <sql-statement>
- CREATE TABLE as_select1 AS EXECUTE select1;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 277
- CREATE TABLE as_select1 AS EXECUTE select1;
- ^
- <sql-statement>
- CREATE TABLE as_select1 AS EXECUTE select1;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 277
- CREATE TABLE as_select1 AS EXECUTE select1;
- ^
- <sql-statement>
- SELECT * FROM as_select1;
- </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.as_select1
-
- <sql-statement>
- CREATE TABLE IF NOT EXISTS as_select1 AS EXECUTE select1;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 277
- CREATE TABLE IF NOT EXISTS as_select1 AS EXECUTE select1;
- ^
- <sql-statement>
- DROP TABLE as_select1;
- </sql-statement>
- <sql-statement>
- DEALLOCATE select1;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 303
- DEALLOCATE select1;
- ^
- <sql-statement>
- -- create an extra wide table to test for issues related to that
- -- (temporarily hide query, to avoid the long CREATE TABLE stmt)
- \set ECHO none
- </sql-statement>
- Metacommand \set ECHO none is not supported
- <sql-statement>
- SELECT 'CREATE TABLE extra_wide_table(firstc text, '|| array_to_string(array_agg('c'||i||' bool'),',')||', lastc text);'
- FROM generate_series(1, 1100) g(i)
- \gexec
- </sql-statement>
- Metacommand \gexec is not supported
- <sql-statement>
- \set ECHO all
- </sql-statement>
- Metacommand \set ECHO all is not supported
- <sql-statement>
- INSERT INTO extra_wide_table(firstc, lastc) VALUES('first col', 'last col');
- </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.extra_wide_table
-
- <sql-statement>
- SELECT firstc, lastc FROM extra_wide_table;
- </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.extra_wide_table
-
- <sql-statement>
- -- check that tables with oids cannot be created anymore
- CREATE TABLE withoid() WITH OIDS;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:2:29: Error: ERROR: syntax error at or near "OIDS"
- CREATE TABLE withoid() WITH OIDS;
- ^
- <sql-statement>
- CREATE TABLE withoid() WITH (oids);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table options not supported
- CREATE TABLE withoid() WITH (oids);
- ^
- <sql-statement>
- CREATE TABLE withoid() WITH (oids = true);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table options not supported
- CREATE TABLE withoid() WITH (oids = true);
- ^
- <sql-statement>
- -- but explicitly not adding oids is still supported
- CREATE TEMP TABLE withoutoid() WITHOUT OIDS;
- </sql-statement>
- <sql-statement>
- DROP TABLE withoutoid;
- </sql-statement>
- <sql-statement>
- CREATE TEMP TABLE withoutoid() WITH (oids = false);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table options not supported
- CREATE TEMP TABLE withoutoid() WITH (oids = false);
- ^
- <sql-statement>
- DROP TABLE withoutoid;
- </sql-statement>
- <sql-statement>
- -- check restriction with default expressions
- -- invalid use of column reference in default expressions
- CREATE TABLE default_expr_column (id int DEFAULT (id));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:3:51: Error: Columns are not allowed in: DEFAULT
- CREATE TABLE default_expr_column (id int DEFAULT (id));
- ^
- <sql-statement>
- CREATE TABLE default_expr_column (id int DEFAULT (bar.id));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:51: Error: Columns are not allowed in: DEFAULT
- CREATE TABLE default_expr_column (id int DEFAULT (bar.id));
- ^
- <sql-statement>
- CREATE TABLE default_expr_agg_column (id int DEFAULT (avg(id)));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:55: Error: Aggregate functions are not allowed in: DEFAULT
- CREATE TABLE default_expr_agg_column (id int DEFAULT (avg(id)));
- ^
- <sql-statement>
- -- invalid column definition
- CREATE TABLE default_expr_non_column (a int DEFAULT (avg(non_existent)));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:2:54: Error: Aggregate functions are not allowed in: DEFAULT
- CREATE TABLE default_expr_non_column (a int DEFAULT (avg(non_existent)));
- ^
- <sql-statement>
- -- invalid use of aggregate
- CREATE TABLE default_expr_agg (a int DEFAULT (avg(1)));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:2:47: Error: Aggregate functions are not allowed in: DEFAULT
- CREATE TABLE default_expr_agg (a int DEFAULT (avg(1)));
- ^
- <sql-statement>
- -- invalid use of subquery
- CREATE TABLE default_expr_agg (a int DEFAULT (select 1));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:2:46: Error: SubLinks are not allowed in: DEFAULT
- CREATE TABLE default_expr_agg (a int DEFAULT (select 1));
- ^
- <sql-statement>
- -- invalid use of set-returning function
- CREATE TABLE default_expr_agg (a int DEFAULT (generate_series(1,3)));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:2:47: Error: Generator functions are not allowed in: DEFAULT
- CREATE TABLE default_expr_agg (a int DEFAULT (generate_series(1,3)));
- ^
- <sql-statement>
- -- Verify that subtransaction rollback restores rd_createSubid.
- BEGIN;
- </sql-statement>
- <sql-statement>
- CREATE TABLE remember_create_subid (c int);
- </sql-statement>
- <sql-statement>
- SAVEPOINT q;
- </sql-statement>
- <sql-statement>
- DROP TABLE remember_create_subid;
- </sql-statement>
- <sql-statement>
- ROLLBACK TO q;
- </sql-statement>
- <sql-statement>
- COMMIT;
- </sql-statement>
- <sql-statement>
- DROP TABLE remember_create_subid;
- </sql-statement>
- <sql-statement>
- -- Verify that subtransaction rollback restores rd_firstRelfilenodeSubid.
- CREATE TABLE remember_node_subid (c int);
- </sql-statement>
- <sql-statement>
- BEGIN;
- </sql-statement>
- <sql-statement>
- ALTER TABLE remember_node_subid ALTER c TYPE bigint;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
- ALTER TABLE remember_node_subid ALTER c TYPE bigint;
- ^
- <sql-statement>
- SAVEPOINT q;
- </sql-statement>
- <sql-statement>
- DROP TABLE remember_node_subid;
- </sql-statement>
- <sql-statement>
- ROLLBACK TO q;
- </sql-statement>
- <sql-statement>
- COMMIT;
- </sql-statement>
- <sql-statement>
- DROP TABLE remember_node_subid;
- </sql-statement>
- <sql-statement>
- --
- -- Partitioned tables
- --
- -- cannot combine INHERITS and PARTITION BY (although grammar allows)
- CREATE TABLE partitioned (
- a int
- ) INHERITS (some_table) PARTITION BY LIST (a);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- --
- ^
- <sql-statement>
- -- cannot use more than 1 column as partition key for list partitioned table
- CREATE TABLE partitioned (
- a1 int,
- a2 int
- ) PARTITION BY LIST (a1, a2); -- fail
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- cannot use more than 1 column as partition key for list partitioned table
- ^
- <sql-statement>
- -- unsupported constraint type for partitioned tables
- CREATE TABLE partitioned (
- a int,
- EXCLUDE USING gist (a WITH &&)
- ) PARTITION BY RANGE (a);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- unsupported constraint type for partitioned tables
- ^
- <sql-statement>
- -- prevent using prohibited expressions in the key
- CREATE FUNCTION retset (a int) RETURNS SETOF int AS $$ SELECT 1; $$ LANGUAGE SQL IMMUTABLE;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 261
- -- prevent using prohibited expressions in the key
- ^
- <sql-statement>
- CREATE TABLE partitioned (
- a int
- ) PARTITION BY RANGE (retset(a));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- CREATE TABLE partitioned (
- ^
- <sql-statement>
- DROP FUNCTION retset(int);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: DropStmt: alternative is not implemented yet : 386
- DROP FUNCTION retset(int);
- ^
- <sql-statement>
- CREATE TABLE partitioned (
- a int
- ) PARTITION BY RANGE ((avg(a)));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- CREATE TABLE partitioned (
- ^
- <sql-statement>
- CREATE TABLE partitioned (
- a int,
- b int
- ) PARTITION BY RANGE ((avg(a) OVER (PARTITION BY b)));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- CREATE TABLE partitioned (
- ^
- <sql-statement>
- CREATE TABLE partitioned (
- a int
- ) PARTITION BY LIST ((a LIKE (SELECT 1)));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- CREATE TABLE partitioned (
- ^
- <sql-statement>
- CREATE TABLE partitioned (
- a int
- ) PARTITION BY RANGE ((42));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- CREATE TABLE partitioned (
- ^
- <sql-statement>
- CREATE FUNCTION const_func () RETURNS int AS $$ SELECT 1; $$ LANGUAGE SQL IMMUTABLE;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 261
- CREATE FUNCTION const_func () RETURNS int AS $$ SELECT 1; $$ LANGUAGE SQL IMMUTABLE;
- ^
- <sql-statement>
- CREATE TABLE partitioned (
- a int
- ) PARTITION BY RANGE (const_func());
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- CREATE TABLE partitioned (
- ^
- <sql-statement>
- DROP FUNCTION const_func();
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: DropStmt: alternative is not implemented yet : 386
- DROP FUNCTION const_func();
- ^
- <sql-statement>
- -- only accept valid partitioning strategy
- CREATE TABLE partitioned (
- a int
- ) PARTITION BY MAGIC (a);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- only accept valid partitioning strategy
- ^
- <sql-statement>
- -- specified column must be present in the table
- CREATE TABLE partitioned (
- a int
- ) PARTITION BY RANGE (b);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- specified column must be present in the table
- ^
- <sql-statement>
- -- cannot use system columns in partition key
- CREATE TABLE partitioned (
- a int
- ) PARTITION BY RANGE (xmin);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- cannot use system columns in partition key
- ^
- <sql-statement>
- -- cannot use pseudotypes
- CREATE TABLE partitioned (
- a int,
- b int
- ) PARTITION BY RANGE (((a, b)));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- cannot use pseudotypes
- ^
- <sql-statement>
- CREATE TABLE partitioned (
- a int,
- b int
- ) PARTITION BY RANGE (a, ('unknown'));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- CREATE TABLE partitioned (
- ^
- <sql-statement>
- -- functions in key must be immutable
- CREATE FUNCTION immut_func (a int) RETURNS int AS $$ SELECT a + random()::int; $$ LANGUAGE SQL;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 261
- -- functions in key must be immutable
- ^
- <sql-statement>
- CREATE TABLE partitioned (
- a int
- ) PARTITION BY RANGE (immut_func(a));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- CREATE TABLE partitioned (
- ^
- <sql-statement>
- DROP FUNCTION immut_func(int);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: DropStmt: alternative is not implemented yet : 386
- DROP FUNCTION immut_func(int);
- ^
- <sql-statement>
- -- prevent using columns of unsupported types in key (type must have a btree operator class)
- CREATE TABLE partitioned (
- a point
- ) PARTITION BY LIST (a);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- prevent using columns of unsupported types in key (type must have a btree operator class)
- ^
- <sql-statement>
- CREATE TABLE partitioned (
- a point
- ) PARTITION BY LIST (a point_ops);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- CREATE TABLE partitioned (
- ^
- <sql-statement>
- CREATE TABLE partitioned (
- a point
- ) PARTITION BY RANGE (a);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- CREATE TABLE partitioned (
- ^
- <sql-statement>
- CREATE TABLE partitioned (
- a point
- ) PARTITION BY RANGE (a point_ops);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- CREATE TABLE partitioned (
- ^
- <sql-statement>
- -- cannot add NO INHERIT constraints to partitioned tables
- CREATE TABLE partitioned (
- a int,
- CONSTRAINT check_a CHECK (a > 0) NO INHERIT
- ) PARTITION BY RANGE (a);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- cannot add NO INHERIT constraints to partitioned tables
- ^
- <sql-statement>
- -- some checks after successful creation of a partitioned table
- CREATE FUNCTION plusone(a int) RETURNS INT AS $$ SELECT a+1; $$ LANGUAGE SQL;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 261
- -- some checks after successful creation of a partitioned table
- ^
- <sql-statement>
- CREATE TABLE partitioned (
- a int,
- b int,
- c text,
- d text
- ) PARTITION BY RANGE (a oid_ops, plusone(b), c collate "default", d collate "C");
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- CREATE TABLE partitioned (
- ^
- <sql-statement>
- -- check relkind
- SELECT relkind FROM pg_class WHERE relname = 'partitioned';
- </sql-statement>
- <sql-statement>
- -- prevent a function referenced in partition key from being dropped
- DROP FUNCTION plusone(int);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: DropStmt: alternative is not implemented yet : 386
- -- prevent a function referenced in partition key from being dropped
- ^
- <sql-statement>
- -- partitioned table cannot participate in regular inheritance
- CREATE TABLE partitioned2 (
- a int,
- b text
- ) PARTITION BY RANGE ((a+1), substr(b, 1, 5));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- partitioned table cannot participate in regular inheritance
- ^
- <sql-statement>
- CREATE TABLE fail () INHERITS (partitioned2);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE fail () INHERITS (partitioned2);
- ^
- <sql-statement>
- -- Partition key in describe output
- \d partitioned
- </sql-statement>
- Metacommand \d partitioned is not supported
- <sql-statement>
- \d+ partitioned2
- </sql-statement>
- Metacommand \d+ partitioned2 is not supported
- <sql-statement>
- INSERT INTO partitioned2 VALUES (1, 'hello');
- </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.partitioned2
-
- <sql-statement>
- CREATE TABLE part2_1 PARTITION OF partitioned2 FOR VALUES FROM (-1, 'aaaaa') TO (100, 'ccccc');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part2_1 PARTITION OF partitioned2 FOR VALUES FROM (-1, 'aaaaa') TO (100, 'ccccc');
- ^
- <sql-statement>
- \d+ part2_1
- </sql-statement>
- Metacommand \d+ part2_1 is not supported
- <sql-statement>
- DROP TABLE partitioned, partitioned2;
- </sql-statement>
- <sql-statement>
- -- check reference to partitioned table's rowtype in partition descriptor
- create table partitioned (a int, b int)
- partition by list ((row(a, b)::partitioned));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- check reference to partitioned table's rowtype in partition descriptor
- ^
- <sql-statement>
- create table partitioned1
- partition of partitioned for values in ('(1,2)'::partitioned);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- create table partitioned1
- ^
- <sql-statement>
- create table partitioned2
- partition of partitioned for values in ('(2,4)'::partitioned);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- create table partitioned2
- ^
- <sql-statement>
- explain (costs off)
- select * from partitioned where row(a,b)::partitioned = '(1,2)'::partitioned;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 276
- explain (costs off)
- ^
- <sql-statement>
- drop table partitioned;
- </sql-statement>
- <sql-statement>
- -- whole-row Var in partition key works too
- create table partitioned (a int, b int)
- partition by list ((partitioned));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- whole-row Var in partition key works too
- ^
- <sql-statement>
- create table partitioned1
- partition of partitioned for values in ('(1,2)');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- create table partitioned1
- ^
- <sql-statement>
- create table partitioned2
- partition of partitioned for values in ('(2,4)');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- create table partitioned2
- ^
- <sql-statement>
- explain (costs off)
- select * from partitioned where partitioned = '(1,2)'::partitioned;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 276
- explain (costs off)
- ^
- <sql-statement>
- \d+ partitioned1
- </sql-statement>
- Metacommand \d+ partitioned1 is not supported
- <sql-statement>
- drop table partitioned;
- </sql-statement>
- <sql-statement>
- -- check that dependencies of partition columns are handled correctly
- create domain intdom1 as int;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 272
- -- check that dependencies of partition columns are handled correctly
- ^
- <sql-statement>
- create table partitioned (
- a intdom1,
- b text
- ) partition by range (a);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- create table partitioned (
- ^
- <sql-statement>
- alter table partitioned drop column a; -- fail
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
- alter table partitioned drop column a; -- fail
- ^
- <sql-statement>
- drop domain intdom1; -- fail, requires cascade
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: DropStmt: alternative is not implemented yet : 373
- drop domain intdom1; -- fail, requires cascade
- ^
- <sql-statement>
- drop domain intdom1 cascade;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: DropStmt: alternative is not implemented yet : 373
- drop domain intdom1 cascade;
- ^
- <sql-statement>
- table partitioned; -- gone
- </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.partitioned
-
- <sql-statement>
- -- likewise for columns used in partition expressions
- create domain intdom1 as int;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 272
- -- likewise for columns used in partition expressions
- ^
- <sql-statement>
- create table partitioned (
- a intdom1,
- b text
- ) partition by range (plusone(a));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- create table partitioned (
- ^
- <sql-statement>
- alter table partitioned drop column a; -- fail
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
- alter table partitioned drop column a; -- fail
- ^
- <sql-statement>
- drop domain intdom1; -- fail, requires cascade
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: DropStmt: alternative is not implemented yet : 373
- drop domain intdom1; -- fail, requires cascade
- ^
- <sql-statement>
- drop domain intdom1 cascade;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: DropStmt: alternative is not implemented yet : 373
- drop domain intdom1 cascade;
- ^
- <sql-statement>
- table partitioned; -- gone
- </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.partitioned
-
- <sql-statement>
- --
- -- Partitions
- --
- -- check partition bound syntax
- CREATE TABLE list_parted (
- a int
- ) PARTITION BY LIST (a);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- --
- ^
- <sql-statement>
- CREATE TABLE part_p1 PARTITION OF list_parted FOR VALUES IN ('1');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part_p1 PARTITION OF list_parted FOR VALUES IN ('1');
- ^
- <sql-statement>
- CREATE TABLE part_p2 PARTITION OF list_parted FOR VALUES IN (2);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part_p2 PARTITION OF list_parted FOR VALUES IN (2);
- ^
- <sql-statement>
- CREATE TABLE part_p3 PARTITION OF list_parted FOR VALUES IN ((2+1));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part_p3 PARTITION OF list_parted FOR VALUES IN ((2+1));
- ^
- <sql-statement>
- CREATE TABLE part_null PARTITION OF list_parted FOR VALUES IN (null);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part_null PARTITION OF list_parted FOR VALUES IN (null);
- ^
- <sql-statement>
- \d+ list_parted
- </sql-statement>
- Metacommand \d+ list_parted is not supported
- <sql-statement>
- -- forbidden expressions for partition bound with list partitioned table
- CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (somename);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- -- forbidden expressions for partition bound with list partitioned table
- ^
- <sql-statement>
- CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (somename.somename);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (somename.somename);
- ^
- <sql-statement>
- CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (a);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (a);
- ^
- <sql-statement>
- CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (sum(a));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (sum(a));
- ^
- <sql-statement>
- CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (sum(somename));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (sum(somename));
- ^
- <sql-statement>
- CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (sum(1));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (sum(1));
- ^
- <sql-statement>
- CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN ((select 1));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN ((select 1));
- ^
- <sql-statement>
- CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (generate_series(4, 6));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN (generate_series(4, 6));
- ^
- <sql-statement>
- CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN ((1+1) collate "POSIX");
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part_bogus_expr_fail PARTITION OF list_parted FOR VALUES IN ((1+1) collate "POSIX");
- ^
- <sql-statement>
- -- syntax does not allow empty list of values for list partitions
- CREATE TABLE fail_part PARTITION OF list_parted FOR VALUES IN ();
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:2:64: Error: ERROR: syntax error at or near ")"
- CREATE TABLE fail_part PARTITION OF list_parted FOR VALUES IN ();
- ^
- <sql-statement>
- -- trying to specify range for list partitioned table
- CREATE TABLE fail_part PARTITION OF list_parted FOR VALUES FROM (1) TO (2);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- -- trying to specify range for list partitioned table
- ^
- <sql-statement>
- -- trying to specify modulus and remainder for list partitioned table
- CREATE TABLE fail_part PARTITION OF list_parted FOR VALUES WITH (MODULUS 10, REMAINDER 1);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:2:66: Error: ERROR: unrecognized hash partition bound specification "MODULUS"
- CREATE TABLE fail_part PARTITION OF list_parted FOR VALUES WITH (MODULUS 10, REMAINDER 1);
- ^
- <sql-statement>
- -- check default partition cannot be created more than once
- CREATE TABLE part_default PARTITION OF list_parted DEFAULT;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- -- check default partition cannot be created more than once
- ^
- <sql-statement>
- CREATE TABLE fail_default_part PARTITION OF list_parted DEFAULT;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE fail_default_part PARTITION OF list_parted DEFAULT;
- ^
- <sql-statement>
- -- specified literal can't be cast to the partition column data type
- CREATE TABLE bools (
- a bool
- ) PARTITION BY LIST (a);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- specified literal can't be cast to the partition column data type
- ^
- <sql-statement>
- CREATE TABLE bools_true PARTITION OF bools FOR VALUES IN (1);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE bools_true PARTITION OF bools FOR VALUES IN (1);
- ^
- <sql-statement>
- DROP TABLE bools;
- </sql-statement>
- <sql-statement>
- -- specified literal can be cast, and the cast might not be immutable
- CREATE TABLE moneyp (
- a money
- ) PARTITION BY LIST (a);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- specified literal can be cast, and the cast might not be immutable
- ^
- <sql-statement>
- CREATE TABLE moneyp_10 PARTITION OF moneyp FOR VALUES IN (10);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE moneyp_10 PARTITION OF moneyp FOR VALUES IN (10);
- ^
- <sql-statement>
- CREATE TABLE moneyp_11 PARTITION OF moneyp FOR VALUES IN ('11');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE moneyp_11 PARTITION OF moneyp FOR VALUES IN ('11');
- ^
- <sql-statement>
- CREATE TABLE moneyp_12 PARTITION OF moneyp FOR VALUES IN (to_char(12, '99')::int);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE moneyp_12 PARTITION OF moneyp FOR VALUES IN (to_char(12, '99')::int);
- ^
- <sql-statement>
- DROP TABLE moneyp;
- </sql-statement>
- <sql-statement>
- -- cast is immutable
- CREATE TABLE bigintp (
- a bigint
- ) PARTITION BY LIST (a);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- cast is immutable
- ^
- <sql-statement>
- CREATE TABLE bigintp_10 PARTITION OF bigintp FOR VALUES IN (10);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE bigintp_10 PARTITION OF bigintp FOR VALUES IN (10);
- ^
- <sql-statement>
- -- fails due to overlap:
- CREATE TABLE bigintp_10_2 PARTITION OF bigintp FOR VALUES IN ('10');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- -- fails due to overlap:
- ^
- <sql-statement>
- DROP TABLE bigintp;
- </sql-statement>
- <sql-statement>
- CREATE TABLE range_parted (
- a date
- ) PARTITION BY RANGE (a);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- CREATE TABLE range_parted (
- ^
- <sql-statement>
- -- forbidden expressions for partition bounds with range partitioned table
- CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
- FOR VALUES FROM (somename) TO ('2019-01-01');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- -- forbidden expressions for partition bounds with range partitioned table
- ^
- <sql-statement>
- CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
- FOR VALUES FROM (somename.somename) TO ('2019-01-01');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
- ^
- <sql-statement>
- CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
- FOR VALUES FROM (a) TO ('2019-01-01');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
- ^
- <sql-statement>
- CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
- FOR VALUES FROM (max(a)) TO ('2019-01-01');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
- ^
- <sql-statement>
- CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
- FOR VALUES FROM (max(somename)) TO ('2019-01-01');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
- ^
- <sql-statement>
- CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
- FOR VALUES FROM (max('2019-02-01'::date)) TO ('2019-01-01');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
- ^
- <sql-statement>
- CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
- FOR VALUES FROM ((select 1)) TO ('2019-01-01');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
- ^
- <sql-statement>
- CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
- FOR VALUES FROM (generate_series(1, 3)) TO ('2019-01-01');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part_bogus_expr_fail PARTITION OF range_parted
- ^
- <sql-statement>
- -- trying to specify list for range partitioned table
- CREATE TABLE fail_part PARTITION OF range_parted FOR VALUES IN ('a');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- -- trying to specify list for range partitioned table
- ^
- <sql-statement>
- -- trying to specify modulus and remainder for range partitioned table
- CREATE TABLE fail_part PARTITION OF range_parted FOR VALUES WITH (MODULUS 10, REMAINDER 1);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:2:67: Error: ERROR: unrecognized hash partition bound specification "MODULUS"
- CREATE TABLE fail_part PARTITION OF range_parted FOR VALUES WITH (MODULUS 10, REMAINDER 1);
- ^
- <sql-statement>
- -- each of start and end bounds must have same number of values as the
- -- length of the partition key
- CREATE TABLE fail_part PARTITION OF range_parted FOR VALUES FROM ('a', 1) TO ('z');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- -- each of start and end bounds must have same number of values as the
- ^
- <sql-statement>
- CREATE TABLE fail_part PARTITION OF range_parted FOR VALUES FROM ('a') TO ('z', 1);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE fail_part PARTITION OF range_parted FOR VALUES FROM ('a') TO ('z', 1);
- ^
- <sql-statement>
- -- cannot specify null values in range bounds
- CREATE TABLE fail_part PARTITION OF range_parted FOR VALUES FROM (null) TO (maxvalue);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- -- cannot specify null values in range bounds
- ^
- <sql-statement>
- -- trying to specify modulus and remainder for range partitioned table
- CREATE TABLE fail_part PARTITION OF range_parted FOR VALUES WITH (MODULUS 10, REMAINDER 1);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:2:67: Error: ERROR: unrecognized hash partition bound specification "MODULUS"
- CREATE TABLE fail_part PARTITION OF range_parted FOR VALUES WITH (MODULUS 10, REMAINDER 1);
- ^
- <sql-statement>
- -- check partition bound syntax for the hash partition
- CREATE TABLE hash_parted (
- a int
- ) PARTITION BY HASH (a);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- check partition bound syntax for the hash partition
- ^
- <sql-statement>
- CREATE TABLE hpart_1 PARTITION OF hash_parted FOR VALUES WITH (MODULUS 10, REMAINDER 0);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:65: Error: ERROR: unrecognized hash partition bound specification "MODULUS"
- CREATE TABLE hpart_1 PARTITION OF hash_parted FOR VALUES WITH (MODULUS 10, REMAINDER 0);
- ^
- <sql-statement>
- CREATE TABLE hpart_2 PARTITION OF hash_parted FOR VALUES WITH (MODULUS 50, REMAINDER 1);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:65: Error: ERROR: unrecognized hash partition bound specification "MODULUS"
- CREATE TABLE hpart_2 PARTITION OF hash_parted FOR VALUES WITH (MODULUS 50, REMAINDER 1);
- ^
- <sql-statement>
- CREATE TABLE hpart_3 PARTITION OF hash_parted FOR VALUES WITH (MODULUS 200, REMAINDER 2);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:65: Error: ERROR: unrecognized hash partition bound specification "MODULUS"
- CREATE TABLE hpart_3 PARTITION OF hash_parted FOR VALUES WITH (MODULUS 200, REMAINDER 2);
- ^
- <sql-statement>
- CREATE TABLE hpart_4 PARTITION OF hash_parted FOR VALUES WITH (MODULUS 10, REMAINDER 3);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:65: Error: ERROR: unrecognized hash partition bound specification "MODULUS"
- CREATE TABLE hpart_4 PARTITION OF hash_parted FOR VALUES WITH (MODULUS 10, REMAINDER 3);
- ^
- <sql-statement>
- -- modulus 25 is factor of modulus of 50 but 10 is not a factor of 25.
- CREATE TABLE fail_part PARTITION OF hash_parted FOR VALUES WITH (MODULUS 25, REMAINDER 3);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:2:66: Error: ERROR: unrecognized hash partition bound specification "MODULUS"
- CREATE TABLE fail_part PARTITION OF hash_parted FOR VALUES WITH (MODULUS 25, REMAINDER 3);
- ^
- <sql-statement>
- -- previous modulus 50 is factor of 150 but this modulus is not a factor of next modulus 200.
- CREATE TABLE fail_part PARTITION OF hash_parted FOR VALUES WITH (MODULUS 150, REMAINDER 3);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:2:66: Error: ERROR: unrecognized hash partition bound specification "MODULUS"
- CREATE TABLE fail_part PARTITION OF hash_parted FOR VALUES WITH (MODULUS 150, REMAINDER 3);
- ^
- <sql-statement>
- -- overlapping remainders
- CREATE TABLE fail_part PARTITION OF hash_parted FOR VALUES WITH (MODULUS 100, REMAINDER 3);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:2:66: Error: ERROR: unrecognized hash partition bound specification "MODULUS"
- CREATE TABLE fail_part PARTITION OF hash_parted FOR VALUES WITH (MODULUS 100, REMAINDER 3);
- ^
- <sql-statement>
- -- trying to specify range for the hash partitioned table
- CREATE TABLE fail_part PARTITION OF hash_parted FOR VALUES FROM ('a', 1) TO ('z');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- -- trying to specify range for the hash partitioned table
- ^
- <sql-statement>
- -- trying to specify list value for the hash partitioned table
- CREATE TABLE fail_part PARTITION OF hash_parted FOR VALUES IN (1000);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- -- trying to specify list value for the hash partitioned table
- ^
- <sql-statement>
- -- trying to create default partition for the hash partitioned table
- CREATE TABLE fail_default_part PARTITION OF hash_parted DEFAULT;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- -- trying to create default partition for the hash partitioned table
- ^
- <sql-statement>
- -- check if compatible with the specified parent
- -- cannot create as partition of a non-partitioned table
- CREATE TABLE unparted (
- a int
- );
- </sql-statement>
- <sql-statement>
- CREATE TABLE fail_part PARTITION OF unparted FOR VALUES IN ('a');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE fail_part PARTITION OF unparted FOR VALUES IN ('a');
- ^
- <sql-statement>
- CREATE TABLE fail_part PARTITION OF unparted FOR VALUES WITH (MODULUS 2, REMAINDER 1);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:64: Error: ERROR: unrecognized hash partition bound specification "MODULUS"
- CREATE TABLE fail_part PARTITION OF unparted FOR VALUES WITH (MODULUS 2, REMAINDER 1);
- ^
- <sql-statement>
- DROP TABLE unparted;
- </sql-statement>
- <sql-statement>
- -- cannot create a permanent rel as partition of a temp rel
- CREATE TEMP TABLE temp_parted (
- a int
- ) PARTITION BY LIST (a);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- cannot create a permanent rel as partition of a temp rel
- ^
- <sql-statement>
- CREATE TABLE fail_part PARTITION OF temp_parted FOR VALUES IN ('a');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE fail_part PARTITION OF temp_parted FOR VALUES IN ('a');
- ^
- <sql-statement>
- DROP TABLE temp_parted;
- </sql-statement>
- <sql-statement>
- -- check for partition bound overlap and other invalid specifications
- CREATE TABLE list_parted2 (
- a varchar
- ) PARTITION BY LIST (a);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- check for partition bound overlap and other invalid specifications
- ^
- <sql-statement>
- CREATE TABLE part_null_z PARTITION OF list_parted2 FOR VALUES IN (null, 'z');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part_null_z PARTITION OF list_parted2 FOR VALUES IN (null, 'z');
- ^
- <sql-statement>
- CREATE TABLE part_ab PARTITION OF list_parted2 FOR VALUES IN ('a', 'b');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part_ab PARTITION OF list_parted2 FOR VALUES IN ('a', 'b');
- ^
- <sql-statement>
- CREATE TABLE list_parted2_def PARTITION OF list_parted2 DEFAULT;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE list_parted2_def PARTITION OF list_parted2 DEFAULT;
- ^
- <sql-statement>
- CREATE TABLE fail_part PARTITION OF list_parted2 FOR VALUES IN (null);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE fail_part PARTITION OF list_parted2 FOR VALUES IN (null);
- ^
- <sql-statement>
- CREATE TABLE fail_part PARTITION OF list_parted2 FOR VALUES IN ('b', 'c');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE fail_part PARTITION OF list_parted2 FOR VALUES IN ('b', 'c');
- ^
- <sql-statement>
- -- check default partition overlap
- INSERT INTO list_parted2 VALUES('X');
- </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.list_parted2
-
- <sql-statement>
- CREATE TABLE fail_part PARTITION OF list_parted2 FOR VALUES IN ('W', 'X', 'Y');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE fail_part PARTITION OF list_parted2 FOR VALUES IN ('W', 'X', 'Y');
- ^
- <sql-statement>
- CREATE TABLE range_parted2 (
- a int
- ) PARTITION BY RANGE (a);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- CREATE TABLE range_parted2 (
- ^
- <sql-statement>
- -- trying to create range partition with empty range
- CREATE TABLE fail_part PARTITION OF range_parted2 FOR VALUES FROM (1) TO (0);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- -- trying to create range partition with empty range
- ^
- <sql-statement>
- -- note that the range '[1, 1)' has no elements
- CREATE TABLE fail_part PARTITION OF range_parted2 FOR VALUES FROM (1) TO (1);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- -- note that the range '[1, 1)' has no elements
- ^
- <sql-statement>
- CREATE TABLE part0 PARTITION OF range_parted2 FOR VALUES FROM (minvalue) TO (1);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part0 PARTITION OF range_parted2 FOR VALUES FROM (minvalue) TO (1);
- ^
- <sql-statement>
- CREATE TABLE fail_part PARTITION OF range_parted2 FOR VALUES FROM (minvalue) TO (2);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE fail_part PARTITION OF range_parted2 FOR VALUES FROM (minvalue) TO (2);
- ^
- <sql-statement>
- CREATE TABLE part1 PARTITION OF range_parted2 FOR VALUES FROM (1) TO (10);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part1 PARTITION OF range_parted2 FOR VALUES FROM (1) TO (10);
- ^
- <sql-statement>
- CREATE TABLE fail_part PARTITION OF range_parted2 FOR VALUES FROM (-1) TO (1);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE fail_part PARTITION OF range_parted2 FOR VALUES FROM (-1) TO (1);
- ^
- <sql-statement>
- CREATE TABLE fail_part PARTITION OF range_parted2 FOR VALUES FROM (9) TO (maxvalue);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE fail_part PARTITION OF range_parted2 FOR VALUES FROM (9) TO (maxvalue);
- ^
- <sql-statement>
- CREATE TABLE part2 PARTITION OF range_parted2 FOR VALUES FROM (20) TO (30);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part2 PARTITION OF range_parted2 FOR VALUES FROM (20) TO (30);
- ^
- <sql-statement>
- CREATE TABLE part3 PARTITION OF range_parted2 FOR VALUES FROM (30) TO (40);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part3 PARTITION OF range_parted2 FOR VALUES FROM (30) TO (40);
- ^
- <sql-statement>
- CREATE TABLE fail_part PARTITION OF range_parted2 FOR VALUES FROM (10) TO (30);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE fail_part PARTITION OF range_parted2 FOR VALUES FROM (10) TO (30);
- ^
- <sql-statement>
- CREATE TABLE fail_part PARTITION OF range_parted2 FOR VALUES FROM (10) TO (50);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE fail_part PARTITION OF range_parted2 FOR VALUES FROM (10) TO (50);
- ^
- <sql-statement>
- -- Create a default partition for range partitioned table
- CREATE TABLE range2_default PARTITION OF range_parted2 DEFAULT;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- -- Create a default partition for range partitioned table
- ^
- <sql-statement>
- -- More than one default partition is not allowed, so this should give error
- CREATE TABLE fail_default_part PARTITION OF range_parted2 DEFAULT;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- -- More than one default partition is not allowed, so this should give error
- ^
- <sql-statement>
- -- Check if the range for default partitions overlap
- INSERT INTO range_parted2 VALUES (85);
- </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.range_parted2
-
- <sql-statement>
- CREATE TABLE fail_part PARTITION OF range_parted2 FOR VALUES FROM (80) TO (90);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE fail_part PARTITION OF range_parted2 FOR VALUES FROM (80) TO (90);
- ^
- <sql-statement>
- CREATE TABLE part4 PARTITION OF range_parted2 FOR VALUES FROM (90) TO (100);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part4 PARTITION OF range_parted2 FOR VALUES FROM (90) TO (100);
- ^
- <sql-statement>
- -- now check for multi-column range partition key
- CREATE TABLE range_parted3 (
- a int,
- b int
- ) PARTITION BY RANGE (a, (b+1));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- now check for multi-column range partition key
- ^
- <sql-statement>
- CREATE TABLE part00 PARTITION OF range_parted3 FOR VALUES FROM (0, minvalue) TO (0, maxvalue);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part00 PARTITION OF range_parted3 FOR VALUES FROM (0, minvalue) TO (0, maxvalue);
- ^
- <sql-statement>
- CREATE TABLE fail_part PARTITION OF range_parted3 FOR VALUES FROM (0, minvalue) TO (0, 1);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE fail_part PARTITION OF range_parted3 FOR VALUES FROM (0, minvalue) TO (0, 1);
- ^
- <sql-statement>
- CREATE TABLE part10 PARTITION OF range_parted3 FOR VALUES FROM (1, minvalue) TO (1, 1);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part10 PARTITION OF range_parted3 FOR VALUES FROM (1, minvalue) TO (1, 1);
- ^
- <sql-statement>
- CREATE TABLE part11 PARTITION OF range_parted3 FOR VALUES FROM (1, 1) TO (1, 10);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part11 PARTITION OF range_parted3 FOR VALUES FROM (1, 1) TO (1, 10);
- ^
- <sql-statement>
- CREATE TABLE part12 PARTITION OF range_parted3 FOR VALUES FROM (1, 10) TO (1, maxvalue);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part12 PARTITION OF range_parted3 FOR VALUES FROM (1, 10) TO (1, maxvalue);
- ^
- <sql-statement>
- CREATE TABLE fail_part PARTITION OF range_parted3 FOR VALUES FROM (1, 10) TO (1, 20);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE fail_part PARTITION OF range_parted3 FOR VALUES FROM (1, 10) TO (1, 20);
- ^
- <sql-statement>
- CREATE TABLE range3_default PARTITION OF range_parted3 DEFAULT;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE range3_default PARTITION OF range_parted3 DEFAULT;
- ^
- <sql-statement>
- -- cannot create a partition that says column b is allowed to range
- -- from -infinity to +infinity, while there exist partitions that have
- -- more specific ranges
- CREATE TABLE fail_part PARTITION OF range_parted3 FOR VALUES FROM (1, minvalue) TO (1, maxvalue);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- -- cannot create a partition that says column b is allowed to range
- ^
- <sql-statement>
- -- check for partition bound overlap and other invalid specifications for the hash partition
- CREATE TABLE hash_parted2 (
- a varchar
- ) PARTITION BY HASH (a);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- check for partition bound overlap and other invalid specifications for the hash partition
- ^
- <sql-statement>
- CREATE TABLE h2part_1 PARTITION OF hash_parted2 FOR VALUES WITH (MODULUS 4, REMAINDER 2);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:67: Error: ERROR: unrecognized hash partition bound specification "MODULUS"
- CREATE TABLE h2part_1 PARTITION OF hash_parted2 FOR VALUES WITH (MODULUS 4, REMAINDER 2);
- ^
- <sql-statement>
- CREATE TABLE h2part_2 PARTITION OF hash_parted2 FOR VALUES WITH (MODULUS 8, REMAINDER 0);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:67: Error: ERROR: unrecognized hash partition bound specification "MODULUS"
- CREATE TABLE h2part_2 PARTITION OF hash_parted2 FOR VALUES WITH (MODULUS 8, REMAINDER 0);
- ^
- <sql-statement>
- CREATE TABLE h2part_3 PARTITION OF hash_parted2 FOR VALUES WITH (MODULUS 8, REMAINDER 4);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:67: Error: ERROR: unrecognized hash partition bound specification "MODULUS"
- CREATE TABLE h2part_3 PARTITION OF hash_parted2 FOR VALUES WITH (MODULUS 8, REMAINDER 4);
- ^
- <sql-statement>
- CREATE TABLE h2part_4 PARTITION OF hash_parted2 FOR VALUES WITH (MODULUS 8, REMAINDER 5);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:67: Error: ERROR: unrecognized hash partition bound specification "MODULUS"
- CREATE TABLE h2part_4 PARTITION OF hash_parted2 FOR VALUES WITH (MODULUS 8, REMAINDER 5);
- ^
- <sql-statement>
- -- overlap with part_4
- CREATE TABLE fail_part PARTITION OF hash_parted2 FOR VALUES WITH (MODULUS 2, REMAINDER 1);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:2:67: Error: ERROR: unrecognized hash partition bound specification "MODULUS"
- CREATE TABLE fail_part PARTITION OF hash_parted2 FOR VALUES WITH (MODULUS 2, REMAINDER 1);
- ^
- <sql-statement>
- -- modulus must be greater than zero
- CREATE TABLE fail_part PARTITION OF hash_parted2 FOR VALUES WITH (MODULUS 0, REMAINDER 1);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:2:67: Error: ERROR: unrecognized hash partition bound specification "MODULUS"
- CREATE TABLE fail_part PARTITION OF hash_parted2 FOR VALUES WITH (MODULUS 0, REMAINDER 1);
- ^
- <sql-statement>
- -- remainder must be greater than or equal to zero and less than modulus
- CREATE TABLE fail_part PARTITION OF hash_parted2 FOR VALUES WITH (MODULUS 8, REMAINDER 8);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:2:67: Error: ERROR: unrecognized hash partition bound specification "MODULUS"
- CREATE TABLE fail_part PARTITION OF hash_parted2 FOR VALUES WITH (MODULUS 8, REMAINDER 8);
- ^
- <sql-statement>
- -- check schema propagation from parent
- CREATE TABLE parted (
- a text,
- b int NOT NULL DEFAULT 0,
- CONSTRAINT check_a CHECK (length(a) > 0)
- ) PARTITION BY LIST (a);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- check schema propagation from parent
- ^
- <sql-statement>
- CREATE TABLE part_a PARTITION OF parted FOR VALUES IN ('a');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part_a PARTITION OF parted FOR VALUES IN ('a');
- ^
- <sql-statement>
- -- able to specify column default, column constraint, and table constraint
- -- first check the "column specified more than once" error
- CREATE TABLE part_b PARTITION OF parted (
- b NOT NULL,
- b DEFAULT 1,
- b CHECK (b >= 0),
- CONSTRAINT check_a CHECK (length(a) > 0)
- ) FOR VALUES IN ('b');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- -- able to specify column default, column constraint, and table constraint
- ^
- <sql-statement>
- CREATE TABLE part_b PARTITION OF parted (
- b NOT NULL DEFAULT 1,
- CONSTRAINT check_a CHECK (length(a) > 0),
- CONSTRAINT check_b CHECK (b >= 0)
- ) FOR VALUES IN ('b');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part_b PARTITION OF parted (
- ^
- <sql-statement>
- -- conislocal should be false for any merged constraints, true otherwise
- SELECT conislocal, coninhcount FROM pg_constraint WHERE conrelid = 'part_b'::regclass ORDER BY conislocal, coninhcount;
- </sql-statement>
- <sql-statement>
- -- Once check_b is added to the parent, it should be made non-local for part_b
- ALTER TABLE parted ADD CONSTRAINT check_b CHECK (b >= 0);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
- -- Once check_b is added to the parent, it should be made non-local for part_b
- ^
- <sql-statement>
- SELECT conislocal, coninhcount FROM pg_constraint WHERE conrelid = 'part_b'::regclass;
- </sql-statement>
- <sql-statement>
- -- Neither check_a nor check_b are droppable from part_b
- ALTER TABLE part_b DROP CONSTRAINT check_a;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
- -- Neither check_a nor check_b are droppable from part_b
- ^
- <sql-statement>
- ALTER TABLE part_b DROP CONSTRAINT check_b;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
- ALTER TABLE part_b DROP CONSTRAINT check_b;
- ^
- <sql-statement>
- -- And dropping it from parted should leave no trace of them on part_b, unlike
- -- traditional inheritance where they will be left behind, because they would
- -- be local constraints.
- ALTER TABLE parted DROP CONSTRAINT check_a, DROP CONSTRAINT check_b;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
- -- And dropping it from parted should leave no trace of them on part_b, unlike
- ^
- <sql-statement>
- SELECT conislocal, coninhcount FROM pg_constraint WHERE conrelid = 'part_b'::regclass;
- </sql-statement>
- <sql-statement>
- -- specify PARTITION BY for a partition
- CREATE TABLE fail_part_col_not_found PARTITION OF parted FOR VALUES IN ('c') PARTITION BY RANGE (c);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- -- specify PARTITION BY for a partition
- ^
- <sql-statement>
- CREATE TABLE part_c PARTITION OF parted (b WITH OPTIONS NOT NULL DEFAULT 0) FOR VALUES IN ('c') PARTITION BY RANGE ((b));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE part_c PARTITION OF parted (b WITH OPTIONS NOT NULL DEFAULT 0) FOR VALUES IN ('c') PARTITION BY RANGE ((b));
- ^
- <sql-statement>
- -- create a level-2 partition
- CREATE TABLE part_c_1_10 PARTITION OF part_c FOR VALUES FROM (1) TO (10);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- -- create a level-2 partition
- ^
- <sql-statement>
- -- check that NOT NULL and default value are inherited correctly
- create table parted_notnull_inh_test (a int default 1, b int not null default 0) partition by list (a);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- check that NOT NULL and default value are inherited correctly
- ^
- <sql-statement>
- create table parted_notnull_inh_test1 partition of parted_notnull_inh_test (a not null, b default 1) for values in (1);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- create table parted_notnull_inh_test1 partition of parted_notnull_inh_test (a not null, b default 1) for values in (1);
- ^
- <sql-statement>
- insert into parted_notnull_inh_test (b) values (null);
- </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.parted_notnull_inh_test
-
- <sql-statement>
- -- note that while b's default is overriden, a's default is preserved
- \d parted_notnull_inh_test1
- </sql-statement>
- Metacommand \d parted_notnull_inh_test1 is not supported
- <sql-statement>
- drop table parted_notnull_inh_test;
- </sql-statement>
- <sql-statement>
- -- check that collations are assigned in partition bound expressions
- create table parted_boolean_col (a bool, b text) partition by list(a);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- check that collations are assigned in partition bound expressions
- ^
- <sql-statement>
- create table parted_boolean_less partition of parted_boolean_col
- for values in ('foo' < 'bar');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- create table parted_boolean_less partition of parted_boolean_col
- ^
- <sql-statement>
- create table parted_boolean_greater partition of parted_boolean_col
- for values in ('foo' > 'bar');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- create table parted_boolean_greater partition of parted_boolean_col
- ^
- <sql-statement>
- drop table parted_boolean_col;
- </sql-statement>
- <sql-statement>
- -- check for a conflicting COLLATE clause
- create table parted_collate_must_match (a text collate "C", b text collate "C")
- partition by range (a);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- check for a conflicting COLLATE clause
- ^
- <sql-statement>
- -- on the partition key
- create table parted_collate_must_match1 partition of parted_collate_must_match
- (a collate "POSIX") for values from ('a') to ('m');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- -- on the partition key
- ^
- <sql-statement>
- -- on another column
- create table parted_collate_must_match2 partition of parted_collate_must_match
- (b collate "POSIX") for values from ('m') to ('z');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- -- on another column
- ^
- <sql-statement>
- drop table parted_collate_must_match;
- </sql-statement>
- <sql-statement>
- -- check that non-matching collations for partition bound
- -- expressions are coerced to the right collation
- create table test_part_coll_posix (a text) partition by range (a collate "POSIX");
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- check that non-matching collations for partition bound
- ^
- <sql-statement>
- -- ok, collation is implicitly coerced
- create table test_part_coll partition of test_part_coll_posix for values from ('a' collate "C") to ('g');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- -- ok, collation is implicitly coerced
- ^
- <sql-statement>
- -- ok
- create table test_part_coll2 partition of test_part_coll_posix for values from ('g') to ('m');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- -- ok
- ^
- <sql-statement>
- -- ok, collation is implicitly coerced
- create table test_part_coll_cast partition of test_part_coll_posix for values from (name 'm' collate "C") to ('s');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- -- ok, collation is implicitly coerced
- ^
- <sql-statement>
- -- ok; partition collation silently overrides the default collation of type 'name'
- create table test_part_coll_cast2 partition of test_part_coll_posix for values from (name 's') to ('z');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- -- ok; partition collation silently overrides the default collation of type 'name'
- ^
- <sql-statement>
- drop table test_part_coll_posix;
- </sql-statement>
- <sql-statement>
- -- Partition bound in describe output
- \d+ part_b
- </sql-statement>
- Metacommand \d+ part_b is not supported
- <sql-statement>
- -- Both partition bound and partition key in describe output
- \d+ part_c
- </sql-statement>
- Metacommand \d+ part_c is not supported
- <sql-statement>
- -- a level-2 partition's constraint will include the parent's expressions
- \d+ part_c_1_10
- </sql-statement>
- Metacommand \d+ part_c_1_10 is not supported
- <sql-statement>
- -- Show partition count in the parent's describe output
- -- Tempted to include \d+ output listing partitions with bound info but
- -- output could vary depending on the order in which partition oids are
- -- returned.
- \d parted
- </sql-statement>
- Metacommand \d parted is not supported
- <sql-statement>
- \d hash_parted
- </sql-statement>
- Metacommand \d hash_parted is not supported
- <sql-statement>
- -- check that we get the expected partition constraints
- CREATE TABLE range_parted4 (a int, b int, c int) PARTITION BY RANGE (abs(a), abs(b), c);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- check that we get the expected partition constraints
- ^
- <sql-statement>
- CREATE TABLE unbounded_range_part PARTITION OF range_parted4 FOR VALUES FROM (MINVALUE, MINVALUE, MINVALUE) TO (MAXVALUE, MAXVALUE, MAXVALUE);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE unbounded_range_part PARTITION OF range_parted4 FOR VALUES FROM (MINVALUE, MINVALUE, MINVALUE) TO (MAXVALUE, MAXVALUE, MAXVALUE);
- ^
- <sql-statement>
- \d+ unbounded_range_part
- </sql-statement>
- Metacommand \d+ unbounded_range_part is not supported
- <sql-statement>
- DROP TABLE unbounded_range_part;
- </sql-statement>
- <sql-statement>
- CREATE TABLE range_parted4_1 PARTITION OF range_parted4 FOR VALUES FROM (MINVALUE, MINVALUE, MINVALUE) TO (1, MAXVALUE, MAXVALUE);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE range_parted4_1 PARTITION OF range_parted4 FOR VALUES FROM (MINVALUE, MINVALUE, MINVALUE) TO (1, MAXVALUE, MAXVALUE);
- ^
- <sql-statement>
- \d+ range_parted4_1
- </sql-statement>
- Metacommand \d+ range_parted4_1 is not supported
- <sql-statement>
- CREATE TABLE range_parted4_2 PARTITION OF range_parted4 FOR VALUES FROM (3, 4, 5) TO (6, 7, MAXVALUE);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE range_parted4_2 PARTITION OF range_parted4 FOR VALUES FROM (3, 4, 5) TO (6, 7, MAXVALUE);
- ^
- <sql-statement>
- \d+ range_parted4_2
- </sql-statement>
- Metacommand \d+ range_parted4_2 is not supported
- <sql-statement>
- CREATE TABLE range_parted4_3 PARTITION OF range_parted4 FOR VALUES FROM (6, 8, MINVALUE) TO (9, MAXVALUE, MAXVALUE);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE range_parted4_3 PARTITION OF range_parted4 FOR VALUES FROM (6, 8, MINVALUE) TO (9, MAXVALUE, MAXVALUE);
- ^
- <sql-statement>
- \d+ range_parted4_3
- </sql-statement>
- Metacommand \d+ range_parted4_3 is not supported
- <sql-statement>
- DROP TABLE range_parted4;
- </sql-statement>
- <sql-statement>
- -- user-defined operator class in partition key
- CREATE FUNCTION my_int4_sort(int4,int4) RETURNS int LANGUAGE sql
- AS $$ SELECT CASE WHEN $1 = $2 THEN 0 WHEN $1 > $2 THEN 1 ELSE -1 END; $$;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 261
- -- user-defined operator class in partition key
- ^
- <sql-statement>
- CREATE OPERATOR CLASS test_int4_ops FOR TYPE int4 USING btree AS
- OPERATOR 1 < (int4,int4), OPERATOR 2 <= (int4,int4),
- OPERATOR 3 = (int4,int4), OPERATOR 4 >= (int4,int4),
- OPERATOR 5 > (int4,int4), FUNCTION 1 my_int4_sort(int4,int4);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 298
- CREATE OPERATOR CLASS test_int4_ops FOR TYPE int4 USING btree AS
- ^
- <sql-statement>
- CREATE TABLE partkey_t (a int4) PARTITION BY RANGE (a test_int4_ops);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- CREATE TABLE partkey_t (a int4) PARTITION BY RANGE (a test_int4_ops);
- ^
- <sql-statement>
- CREATE TABLE partkey_t_1 PARTITION OF partkey_t FOR VALUES FROM (0) TO (1000);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE partkey_t_1 PARTITION OF partkey_t FOR VALUES FROM (0) TO (1000);
- ^
- <sql-statement>
- INSERT INTO partkey_t VALUES (100);
- </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.partkey_t
-
- <sql-statement>
- INSERT INTO partkey_t VALUES (200);
- </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.partkey_t
-
- <sql-statement>
- -- cleanup
- DROP TABLE parted, list_parted, range_parted, list_parted2, range_parted2, range_parted3;
- </sql-statement>
- <sql-statement>
- DROP TABLE partkey_t, hash_parted, hash_parted2;
- </sql-statement>
- <sql-statement>
- DROP OPERATOR CLASS test_int4_ops USING btree;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: Not supported object type for DROP
- DROP OPERATOR CLASS test_int4_ops USING btree;
- ^
- <sql-statement>
- DROP FUNCTION my_int4_sort(int4,int4);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: DropStmt: alternative is not implemented yet : 386
- DROP FUNCTION my_int4_sort(int4,int4);
- ^
- <sql-statement>
- -- comments on partitioned tables columns
- CREATE TABLE parted_col_comment (a int, b text) PARTITION BY LIST (a);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- comments on partitioned tables columns
- ^
- <sql-statement>
- COMMENT ON TABLE parted_col_comment IS 'Am partitioned table';
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 258
- COMMENT ON TABLE parted_col_comment IS 'Am partitioned table';
- ^
- <sql-statement>
- COMMENT ON COLUMN parted_col_comment.a IS 'Partition key';
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 258
- COMMENT ON COLUMN parted_col_comment.a IS 'Partition key';
- ^
- <sql-statement>
- SELECT obj_description('parted_col_comment'::regclass);
- </sql-statement>
- <sql-statement>
- \d+ parted_col_comment
- </sql-statement>
- Metacommand \d+ parted_col_comment is not supported
- <sql-statement>
- DROP TABLE parted_col_comment;
- </sql-statement>
- <sql-statement>
- -- list partitioning on array type column
- CREATE TABLE arrlp (a int[]) PARTITION BY LIST (a);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- list partitioning on array type column
- ^
- <sql-statement>
- CREATE TABLE arrlp12 PARTITION OF arrlp FOR VALUES IN ('{1}', '{2}');
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- CREATE TABLE arrlp12 PARTITION OF arrlp FOR VALUES IN ('{1}', '{2}');
- ^
- <sql-statement>
- \d+ arrlp12
- </sql-statement>
- Metacommand \d+ arrlp12 is not supported
- <sql-statement>
- DROP TABLE arrlp;
- </sql-statement>
- <sql-statement>
- -- partition on boolean column
- create table boolspart (a bool) partition by list (a);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- partition on boolean column
- ^
- <sql-statement>
- create table boolspart_t partition of boolspart for values in (true);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- create table boolspart_t partition of boolspart for values in (true);
- ^
- <sql-statement>
- create table boolspart_f partition of boolspart for values in (false);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- create table boolspart_f partition of boolspart for values in (false);
- ^
- <sql-statement>
- \d+ boolspart
- </sql-statement>
- Metacommand \d+ boolspart is not supported
- <sql-statement>
- drop table boolspart;
- </sql-statement>
- <sql-statement>
- -- partitions mixing temporary and permanent relations
- create table perm_parted (a int) partition by list (a);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- partitions mixing temporary and permanent relations
- ^
- <sql-statement>
- create temporary table temp_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 temporary table temp_parted (a int) partition by list (a);
- ^
- <sql-statement>
- create table perm_part partition of temp_parted default; -- error
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- create table perm_part partition of temp_parted default; -- error
- ^
- <sql-statement>
- create temp table temp_part partition of perm_parted default; -- error
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- create temp table temp_part partition of perm_parted default; -- error
- ^
- <sql-statement>
- create temp table temp_part partition of temp_parted default; -- ok
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- create temp table temp_part partition of temp_parted default; -- ok
- ^
- <sql-statement>
- drop table perm_parted cascade;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: CASCADE is not implemented
- drop table perm_parted cascade;
- ^
- <sql-statement>
- drop table temp_parted cascade;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: CASCADE is not implemented
- drop table temp_parted cascade;
- ^
- <sql-statement>
- -- check that adding partitions to a table while it is being used is prevented
- create table tab_part_create (a int) partition by list (a);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- check that adding partitions to a table while it is being used is prevented
- ^
- <sql-statement>
- create or replace function func_part_create() returns trigger
- language plpgsql as $$
- begin
- execute 'create table tab_part_create_1 partition of tab_part_create for values in (1)';
- return null;
- end $$;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 261
- create or replace function func_part_create() returns trigger
- ^
- <sql-statement>
- create trigger trig_part_create before insert on tab_part_create
- for each statement execute procedure func_part_create();
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 283
- create trigger trig_part_create before insert on tab_part_create
- ^
- <sql-statement>
- insert into tab_part_create 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.tab_part_create
-
- <sql-statement>
- drop table tab_part_create;
- </sql-statement>
- <sql-statement>
- drop function func_part_create();
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: DropStmt: alternative is not implemented yet : 386
- drop function func_part_create();
- ^
- <sql-statement>
- -- test using a volatile expression as partition bound
- create table volatile_partbound_test (partkey timestamp) partition by range (partkey);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- test using a volatile expression as partition bound
- ^
- <sql-statement>
- create table volatile_partbound_test1 partition of volatile_partbound_test for values from (minvalue) to (current_timestamp);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- create table volatile_partbound_test1 partition of volatile_partbound_test for values from (minvalue) to (current_timestamp);
- ^
- <sql-statement>
- create table volatile_partbound_test2 partition of volatile_partbound_test for values from (current_timestamp) to (maxvalue);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- create table volatile_partbound_test2 partition of volatile_partbound_test for values from (current_timestamp) to (maxvalue);
- ^
- <sql-statement>
- -- this should go into the partition volatile_partbound_test2
- insert into volatile_partbound_test values (current_timestamp);
- </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.volatile_partbound_test
-
- <sql-statement>
- select tableoid::regclass from volatile_partbound_test;
- </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.volatile_partbound_test
-
- <sql-statement>
- drop table volatile_partbound_test;
- </sql-statement>
- <sql-statement>
- -- test the case where a check constraint on default partition allows
- -- to avoid scanning it when adding a new partition
- create table defcheck (a int, b int) partition by list (b);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- test the case where a check constraint on default partition allows
- ^
- <sql-statement>
- create table defcheck_def (a int, c int, b int);
- </sql-statement>
- <sql-statement>
- alter table defcheck_def drop c;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
- alter table defcheck_def drop c;
- ^
- <sql-statement>
- alter table defcheck attach partition defcheck_def default;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
- alter table defcheck attach partition defcheck_def default;
- ^
- <sql-statement>
- alter table defcheck_def add check (b <= 0 and b is not null);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
- alter table defcheck_def add check (b <= 0 and b is not null);
- ^
- <sql-statement>
- create table defcheck_1 partition of defcheck for values in (1, null);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- create table defcheck_1 partition of defcheck for values in (1, null);
- ^
- <sql-statement>
- -- test that complex default partition constraints are enforced correctly
- insert into defcheck_def values (0, 0);
- </sql-statement>
- <sql-statement>
- create table defcheck_0 partition of defcheck for values in (0);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- create table defcheck_0 partition of defcheck for values in (0);
- ^
- <sql-statement>
- drop table defcheck;
- </sql-statement>
- <sql-statement>
- -- tests of column drop with partition tables and indexes using
- -- predicates and expressions.
- create table part_column_drop (
- useless_1 int,
- id int,
- useless_2 int,
- d int,
- b int,
- useless_3 int
- ) partition by range (id);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: PARTITION BY clause not supported
- -- tests of column drop with partition tables and indexes using
- ^
- <sql-statement>
- alter table part_column_drop drop column useless_1;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
- alter table part_column_drop drop column useless_1;
- ^
- <sql-statement>
- alter table part_column_drop drop column useless_2;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
- alter table part_column_drop drop column useless_2;
- ^
- <sql-statement>
- alter table part_column_drop drop column useless_3;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: alternative is not implemented yet : 245
- alter table part_column_drop drop column useless_3;
- ^
- <sql-statement>
- create index part_column_drop_b_pred on part_column_drop(b) where b = 1;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: partial index is not supported yet
- create index part_column_drop_b_pred on part_column_drop(b) where b = 1;
- ^
- <sql-statement>
- create index part_column_drop_b_expr on part_column_drop((b = 1));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: index expression is not supported yet
- create index part_column_drop_b_expr on part_column_drop((b = 1));
- ^
- <sql-statement>
- create index part_column_drop_d_pred on part_column_drop(d) where d = 2;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: partial index is not supported yet
- create index part_column_drop_d_pred on part_column_drop(d) where d = 2;
- ^
- <sql-statement>
- create index part_column_drop_d_expr on part_column_drop((d = 2));
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: index expression is not supported yet
- create index part_column_drop_d_expr on part_column_drop((d = 2));
- ^
- <sql-statement>
- create table part_column_drop_1_10 partition of
- part_column_drop for values from (1) to (10);
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: table inheritance not supported
- create table part_column_drop_1_10 partition of
- ^
- <sql-statement>
- \d part_column_drop
- </sql-statement>
- Metacommand \d part_column_drop is not supported
- <sql-statement>
- \d part_column_drop_1_10
- </sql-statement>
- Metacommand \d part_column_drop_1_10 is not supported
- <sql-statement>
- drop table part_column_drop;
- </sql-statement>
|