5 -- bad in postquel, but ok in PostgreSQL
19 -- this used to be a syntax error, but now we allow an empty target list
23 select * from nonesuch;
25 -- bad name in target list
26 select nonesuch from pg_database;
28 -- empty distinct list isn't OK
29 select distinct from pg_database;
31 -- bad attribute name on lhs of operator
32 select * from pg_database where nonesuch = pg_database.datname;
34 -- bad attribute name on rhs of operator
35 select * from pg_database where pg_database.datname = nonesuch;
37 -- bad attribute name in select distinct on
38 select distinct on (foobar) * from pg_database;
40 -- grouping with FOR UPDATE
41 select null from pg_database group by datname for update;
42 select null from pg_database group by grouping sets (()) for update;
48 -- missing relation name (this had better not wildcard!)
58 -- missing relation name (this had better not wildcard!)
70 -- missing relation name
74 alter table nonesuch rename to newnonesuch;
77 alter table nonesuch rename to stud_emp;
80 alter table stud_emp rename to student;
83 alter table stud_emp rename to stud_emp;
89 alter table nonesuchrel rename column nonesuchatt to newnonesuchatt;
92 alter table emp rename column nonesuchatt to newnonesuchatt;
95 alter table emp rename column salary to manager;
98 alter table emp rename column salary to ctid;
114 -- sfunc/finalfunc type disagreement
115 create aggregate newavg2 (sfunc = int4pl,
122 create aggregate newcnt1 (sfunc = int4inc,
130 -- missing index name
143 -- missing aggregate name
146 -- missing aggregate type
147 drop aggregate newcnt1;
149 -- bad aggregate name
150 drop aggregate 314159 (int);
152 -- bad aggregate type
153 drop aggregate newcnt (nonesuch);
156 drop aggregate nonesuch (int4);
158 -- no such aggregate for type
159 drop aggregate newcnt (float4);
165 -- missing function name
169 drop function 314159();
172 drop function nonesuch();
191 -- missing everything
195 drop operator equals;
200 -- missing parentheses
201 drop operator int4, int4;
203 -- missing operator name
204 drop operator (int4, int4);
206 -- missing type list contents
207 drop operator === ();
210 drop operator === (int4);
212 -- no such operator by that name
213 drop operator === (int4, int4);
216 drop operator = (nonesuch);
219 drop operator = ( , int4);
222 drop operator = (nonesuch, int4);
225 drop operator = (int4, nonesuch);
228 drop operator = (int4, );
241 drop rule nonesuch on noplace;
243 -- these postquel variants are no longer supported
244 drop tuple rule nonesuch;
245 drop instance rule nonesuch on noplace;
246 drop rewrite rule nonesuch;
249 -- Check that division-by-zero is properly caught.
276 -- Test psql's reporting of syntax error location
288 INSERT INTO foo VALUES(123) foo;
299 (id INT4 UNIQUE NOT NULL, id2 TEXT NOT NULL PRIMARY KEY,
301 id4 INT4 UNIQUE NOT NULL, id5 TEXT UNIQUE NOT NULL);
303 -- long line to be truncated on the left
304 CREATE TABLE foo(id INT4 UNIQUE NOT NULL, id2 TEXT NOT NULL PRIMARY KEY, id3 INTEGER NOT NUL,
305 id4 INT4 UNIQUE NOT NULL, id5 TEXT UNIQUE NOT NULL);
307 -- long line to be truncated on the right
309 id3 INTEGER NOT NUL, id4 INT4 UNIQUE NOT NULL, id5 TEXT UNIQUE NOT NULL, id INT4 UNIQUE NOT NULL, id2 TEXT NOT NULL PRIMARY KEY);
311 -- long line to be truncated both ways
312 CREATE TABLE foo(id INT4 UNIQUE NOT NULL, id2 TEXT NOT NULL PRIMARY KEY, id3 INTEGER NOT NUL, id4 INT4 UNIQUE NOT NULL, id5 TEXT UNIQUE NOT NULL);
314 -- long line to be truncated on the left, many lines
318 foo(id INT4 UNIQUE NOT NULL, id2 TEXT NOT NULL PRIMARY KEY, id3 INTEGER NOT NUL,
329 -- long line to be truncated on the right, many lines
334 id3 INTEGER NOT NUL, id4 INT4 UNIQUE NOT NULL, id5 TEXT UNIQUE NOT NULL, id INT4 UNIQUE NOT NULL, id2 TEXT NOT NULL PRIMARY KEY)
337 -- long line to be truncated both ways, many lines
344 UNIQUE NOT NULL, idx INT4 UNIQUE NOT NULL, idy INT4 UNIQUE NOT NULL, id2 TEXT NOT NULL PRIMARY KEY, id3 INTEGER NOT NUL, id4 INT4 UNIQUE NOT NULL, id5 TEXT UNIQUE NOT NULL,
345 idz INT4 UNIQUE NOT NULL,
346 idv INT4 UNIQUE NOT NULL);
348 -- more than 10 lines...
364 idx INT4 UNIQUE NOT NULL, idy INT4 UNIQUE NOT NULL, id2 TEXT NOT NULL PRIMARY KEY, id3 INTEGER NOT NUL, id4 INT4 UNIQUE NOT NULL, id5 TEXT UNIQUE NOT NULL,
365 idz INT4 UNIQUE NOT NULL,