123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689 |
- Registering pre-existing tables
- onek
- tenk1
- int8_tbl
- <sql-statement>
- --
- -- LIMIT
- -- Check the LIMIT/OFFSET feature of SELECT
- --
- SELECT ''::text AS two, unique1, unique2, stringu1
- FROM onek WHERE unique1 > 50
- ORDER BY unique1 LIMIT 2;
- </sql-statement>
- <sql-statement>
- SELECT ''::text AS five, unique1, unique2, stringu1
- FROM onek WHERE unique1 > 60
- ORDER BY unique1 LIMIT 5;
- </sql-statement>
- <sql-statement>
- SELECT ''::text AS two, unique1, unique2, stringu1
- FROM onek WHERE unique1 > 60 AND unique1 < 63
- ORDER BY unique1 LIMIT 5;
- </sql-statement>
- <sql-statement>
- SELECT ''::text AS three, unique1, unique2, stringu1
- FROM onek WHERE unique1 > 100
- ORDER BY unique1 LIMIT 3 OFFSET 20;
- </sql-statement>
- <sql-statement>
- SELECT ''::text AS zero, unique1, unique2, stringu1
- FROM onek WHERE unique1 < 50
- ORDER BY unique1 DESC LIMIT 8 OFFSET 99;
- </sql-statement>
- <sql-statement>
- SELECT ''::text AS eleven, unique1, unique2, stringu1
- FROM onek WHERE unique1 < 50
- ORDER BY unique1 DESC LIMIT 20 OFFSET 39;
- </sql-statement>
- <sql-statement>
- SELECT ''::text AS ten, unique1, unique2, stringu1
- FROM onek
- ORDER BY unique1 OFFSET 990;
- </sql-statement>
- <sql-statement>
- SELECT ''::text AS five, unique1, unique2, stringu1
- FROM onek
- ORDER BY unique1 OFFSET 990 LIMIT 5;
- </sql-statement>
- <sql-statement>
- SELECT ''::text AS five, unique1, unique2, stringu1
- FROM onek
- ORDER BY unique1 LIMIT 5 OFFSET 900;
- </sql-statement>
- <sql-statement>
- -- Test null limit and offset. The planner would discard a simple null
- -- constant, so to ensure executor is exercised, do this:
- select * from int8_tbl limit (case when random() < 0.5 then null::bigint end);
- </sql-statement>
- <sql-statement>
- select * from int8_tbl offset (case when random() < 0.5 then null::bigint end);
- </sql-statement>
- <sql-statement>
- -- Test assorted cases involving backwards fetch from a LIMIT plan node
- begin;
- </sql-statement>
- <sql-statement>
- declare c1 cursor for select * from int8_tbl limit 10;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 304
- declare c1 cursor for select * from int8_tbl limit 10;
- ^
- <sql-statement>
- fetch all in c1;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch all in c1;
- ^
- <sql-statement>
- fetch 1 in c1;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch 1 in c1;
- ^
- <sql-statement>
- fetch backward 1 in c1;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch backward 1 in c1;
- ^
- <sql-statement>
- fetch backward all in c1;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch backward all in c1;
- ^
- <sql-statement>
- fetch backward 1 in c1;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch backward 1 in c1;
- ^
- <sql-statement>
- fetch all in c1;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch all in c1;
- ^
- <sql-statement>
- declare c2 cursor for select * from int8_tbl limit 3;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 304
- declare c2 cursor for select * from int8_tbl limit 3;
- ^
- <sql-statement>
- fetch all in c2;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch all in c2;
- ^
- <sql-statement>
- fetch 1 in c2;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch 1 in c2;
- ^
- <sql-statement>
- fetch backward 1 in c2;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch backward 1 in c2;
- ^
- <sql-statement>
- fetch backward all in c2;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch backward all in c2;
- ^
- <sql-statement>
- fetch backward 1 in c2;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch backward 1 in c2;
- ^
- <sql-statement>
- fetch all in c2;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch all in c2;
- ^
- <sql-statement>
- declare c3 cursor for select * from int8_tbl offset 3;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 304
- declare c3 cursor for select * from int8_tbl offset 3;
- ^
- <sql-statement>
- fetch all in c3;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch all in c3;
- ^
- <sql-statement>
- fetch 1 in c3;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch 1 in c3;
- ^
- <sql-statement>
- fetch backward 1 in c3;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch backward 1 in c3;
- ^
- <sql-statement>
- fetch backward all in c3;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch backward all in c3;
- ^
- <sql-statement>
- fetch backward 1 in c3;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch backward 1 in c3;
- ^
- <sql-statement>
- fetch all in c3;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch all in c3;
- ^
- <sql-statement>
- declare c4 cursor for select * from int8_tbl offset 10;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 304
- declare c4 cursor for select * from int8_tbl offset 10;
- ^
- <sql-statement>
- fetch all in c4;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch all in c4;
- ^
- <sql-statement>
- fetch 1 in c4;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch 1 in c4;
- ^
- <sql-statement>
- fetch backward 1 in c4;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch backward 1 in c4;
- ^
- <sql-statement>
- fetch backward all in c4;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch backward all in c4;
- ^
- <sql-statement>
- fetch backward 1 in c4;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch backward 1 in c4;
- ^
- <sql-statement>
- fetch all in c4;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch all in c4;
- ^
- <sql-statement>
- declare c5 cursor for select * from int8_tbl order by q1 fetch first 2 rows with ties;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 304
- declare c5 cursor for select * from int8_tbl order by q1 fetch first 2 rows with ties;
- ^
- <sql-statement>
- fetch all in c5;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch all in c5;
- ^
- <sql-statement>
- fetch 1 in c5;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch 1 in c5;
- ^
- <sql-statement>
- fetch backward 1 in c5;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch backward 1 in c5;
- ^
- <sql-statement>
- fetch backward 1 in c5;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch backward 1 in c5;
- ^
- <sql-statement>
- fetch all in c5;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch all in c5;
- ^
- <sql-statement>
- fetch backward all in c5;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch backward all in c5;
- ^
- <sql-statement>
- fetch all in c5;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch all in c5;
- ^
- <sql-statement>
- fetch backward all in c5;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 259
- fetch backward all in c5;
- ^
- <sql-statement>
- rollback;
- </sql-statement>
- <sql-statement>
- -- Stress test for variable LIMIT in conjunction with bounded-heap sorting
- SELECT
- (SELECT n
- FROM (VALUES (1)) AS x,
- (SELECT n FROM generate_series(1,10) AS n
- ORDER BY n LIMIT 1 OFFSET s-1) AS y) AS z
- FROM generate_series(1,10) AS s;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:6:40: Error: Columns are not allowed in: OFFSET
- ORDER BY n LIMIT 1 OFFSET s-1) AS y) AS z
- ^
- -stdin-:<main>: Error: Type annotation
- -stdin-:<main>:1:1: Error: At function: RemovePrefixMembers, At function: PgSelect, At function: PgSetItem, At function: PgResultItem
- -- Stress test for variable LIMIT in conjunction with bounded-heap sorting
- ^
- -stdin-:<main>:3:3: Error: At function: PgSubLink, At function: PgSelect
- (SELECT n
- ^
- -stdin-:<main>:3:3: Error: Recursive query does not have the form non-recursive-term UNION [ALL] recursive-term
- (SELECT n
- ^
- <sql-statement>
- --
- -- Test behavior of volatile and set-returning functions in conjunction
- -- with ORDER BY and LIMIT.
- --
- create temp sequence testseq;
- </sql-statement>
- -stdin-:<main>: Error: Pre type annotation
- -stdin-:<main>:1:1: Error: Unexpected tag: pgObject
- --
- ^
- <sql-statement>
- explain (verbose, costs off)
- select unique1, unique2, nextval('testseq')
- from tenk1 order by unique2 limit 10;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 276
- explain (verbose, costs off)
- ^
- <sql-statement>
- select unique1, unique2, nextval('testseq')
- from tenk1 order by unique2 limit 10;
- </sql-statement>
- -stdin-:<main>: Fatal: Execution
- -stdin-:<main>:1:1: Fatal: Execution of node: YtMap!
- select unique1, unique2, nextval('testseq')
- ^
- -stdin-:<main>:1:1: Fatal: ERROR: relation "testseq" does not exist
- select unique1, unique2, nextval('testseq')
- ^
- <sql-statement>
- select currval('testseq');
- </sql-statement>
- -stdin-:<main>: Fatal: Execution
- -stdin-:<main>:1:1: Fatal: Execution of node: Result
- select currval('testseq');
- ^
- -stdin-:<main>:1:1: Fatal: ERROR: relation "testseq" does not exist
- select currval('testseq');
- ^
- <sql-statement>
- explain (verbose, costs off)
- select unique1, unique2, nextval('testseq')
- from tenk1 order by tenthous limit 10;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 276
- explain (verbose, costs off)
- ^
- <sql-statement>
- select unique1, unique2, nextval('testseq')
- from tenk1 order by tenthous limit 10;
- </sql-statement>
- -stdin-:<main>: Fatal: Execution
- -stdin-:<main>:1:1: Fatal: Execution of node: YtMap!
- select unique1, unique2, nextval('testseq')
- ^
- -stdin-:<main>:1:1: Fatal: ERROR: relation "testseq" does not exist
- select unique1, unique2, nextval('testseq')
- ^
- <sql-statement>
- select currval('testseq');
- </sql-statement>
- -stdin-:<main>: Fatal: Execution
- -stdin-:<main>:1:1: Fatal: Execution of node: Result
- select currval('testseq');
- ^
- -stdin-:<main>:1:1: Fatal: ERROR: relation "testseq" does not exist
- select currval('testseq');
- ^
- <sql-statement>
- explain (verbose, costs off)
- select unique1, unique2, generate_series(1,10)
- from tenk1 order by unique2 limit 7;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 276
- explain (verbose, costs off)
- ^
- <sql-statement>
- select unique1, unique2, generate_series(1,10)
- from tenk1 order by unique2 limit 7;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:26: Error: Generator functions are not allowed in: SELECT
- select unique1, unique2, generate_series(1,10)
- ^
- <sql-statement>
- explain (verbose, costs off)
- select unique1, unique2, generate_series(1,10)
- from tenk1 order by tenthous limit 7;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 276
- explain (verbose, costs off)
- ^
- <sql-statement>
- select unique1, unique2, generate_series(1,10)
- from tenk1 order by tenthous limit 7;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:26: Error: Generator functions are not allowed in: SELECT
- select unique1, unique2, generate_series(1,10)
- ^
- <sql-statement>
- -- use of random() is to keep planner from folding the expressions together
- explain (verbose, costs off)
- select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 276
- -- use of random() is to keep planner from folding the expressions together
- ^
- <sql-statement>
- select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:8: Error: Generator functions are not allowed in: SELECT
- select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2;
- ^
- <sql-statement>
- explain (verbose, costs off)
- select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2
- order by s2 desc;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 276
- explain (verbose, costs off)
- ^
- <sql-statement>
- select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2
- order by s2 desc;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:8: Error: Generator functions are not allowed in: SELECT
- select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2
- ^
- <sql-statement>
- -- test for failure to set all aggregates' aggtranstype
- explain (verbose, costs off)
- select sum(tenthous) as s1, sum(tenthous) + random()*0 as s2
- from tenk1 group by thousand order by thousand limit 3;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: RawStmt: alternative is not implemented yet : 276
- -- test for failure to set all aggregates' aggtranstype
- ^
- <sql-statement>
- select sum(tenthous) as s1, sum(tenthous) + random()*0 as s2
- from tenk1 group by thousand order by thousand limit 3;
- </sql-statement>
- <sql-statement>
- --
- -- FETCH FIRST
- -- Check the WITH TIES clause
- --
- SELECT thousand
- FROM onek WHERE thousand < 5
- ORDER BY thousand FETCH FIRST 2 ROW WITH TIES;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: LimitOption unsupported value: 1
- --
- ^
- <sql-statement>
- SELECT thousand
- FROM onek WHERE thousand < 5
- ORDER BY thousand FETCH FIRST ROWS WITH TIES;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: LimitOption unsupported value: 1
- SELECT thousand
- ^
- <sql-statement>
- SELECT thousand
- FROM onek WHERE thousand < 5
- ORDER BY thousand FETCH FIRST 1 ROW WITH TIES;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: LimitOption unsupported value: 1
- SELECT thousand
- ^
- <sql-statement>
- SELECT thousand
- FROM onek WHERE thousand < 5
- ORDER BY thousand FETCH FIRST 2 ROW ONLY;
- </sql-statement>
- <sql-statement>
- -- SKIP LOCKED and WITH TIES are incompatible
- SELECT thousand
- FROM onek WHERE thousand < 5
- ORDER BY thousand FETCH FIRST 1 ROW WITH TIES FOR UPDATE SKIP LOCKED;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: ERROR: SKIP LOCKED and WITH TIES options cannot be used together
- -- SKIP LOCKED and WITH TIES are incompatible
- ^
- <sql-statement>
- -- should fail
- SELECT ''::text AS two, unique1, unique2, stringu1
- FROM onek WHERE unique1 > 50
- FETCH FIRST 2 ROW WITH TIES;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: ERROR: WITH TIES cannot be specified without ORDER BY clause
- -- should fail
- ^
- <sql-statement>
- -- test ruleutils
- CREATE VIEW limit_thousand_v_1 AS SELECT thousand FROM onek WHERE thousand < 995
- ORDER BY thousand FETCH FIRST 5 ROWS WITH TIES OFFSET 10;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: expected at least one target column
- -- test ruleutils
- ^
- <sql-statement>
- \d+ limit_thousand_v_1
- </sql-statement>
- Metacommand \d+ limit_thousand_v_1 is not supported
- <sql-statement>
- CREATE VIEW limit_thousand_v_2 AS SELECT thousand FROM onek WHERE thousand < 995
- ORDER BY thousand OFFSET 10 FETCH FIRST 5 ROWS ONLY;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: expected at least one target column
- CREATE VIEW limit_thousand_v_2 AS SELECT thousand FROM onek WHERE thousand < 995
- ^
- <sql-statement>
- \d+ limit_thousand_v_2
- </sql-statement>
- Metacommand \d+ limit_thousand_v_2 is not supported
- <sql-statement>
- CREATE VIEW limit_thousand_v_3 AS SELECT thousand FROM onek WHERE thousand < 995
- ORDER BY thousand FETCH FIRST NULL ROWS WITH TIES; -- fails
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: expected at least one target column
- CREATE VIEW limit_thousand_v_3 AS SELECT thousand FROM onek WHERE thousand < 995
- ^
- <sql-statement>
- CREATE VIEW limit_thousand_v_3 AS SELECT thousand FROM onek WHERE thousand < 995
- ORDER BY thousand FETCH FIRST (NULL+1) ROWS WITH TIES;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: expected at least one target column
- CREATE VIEW limit_thousand_v_3 AS SELECT thousand FROM onek WHERE thousand < 995
- ^
- <sql-statement>
- \d+ limit_thousand_v_3
- </sql-statement>
- Metacommand \d+ limit_thousand_v_3 is not supported
- <sql-statement>
- CREATE VIEW limit_thousand_v_4 AS SELECT thousand FROM onek WHERE thousand < 995
- ORDER BY thousand FETCH FIRST NULL ROWS ONLY;
- </sql-statement>
- -stdin-:<main>: Error: Parse Sql
- -stdin-:<main>:1:1: Error: expected at least one target column
- CREATE VIEW limit_thousand_v_4 AS SELECT thousand FROM onek WHERE thousand < 995
- ^
- <sql-statement>
- \d+ limit_thousand_v_4
- </sql-statement>
- Metacommand \d+ limit_thousand_v_4 is not supported
- <sql-statement>
- -- leave these views
- </sql-statement>
|