postgresql/src/test/regress/sql/delete.sql
Tom Lane 289e2905c8 Remove add_missing_from GUC and associated parser support for "implicit RTEs".
Per recent discussion, add_missing_from has been deprecated for long enough to
consider removing, and it's getting in the way of planned parser refactoring.
The system now always behaves as though add_missing_from were OFF.
2009-10-21 20:22:38 +00:00

19 lines
492 B
SQL

CREATE TABLE delete_test (
id SERIAL PRIMARY KEY,
a INT
);
INSERT INTO delete_test (a) VALUES (10);
INSERT INTO delete_test (a) VALUES (50);
INSERT INTO delete_test (a) VALUES (100);
-- allow an alias to be specified for DELETE's target table
DELETE FROM delete_test AS dt WHERE dt.a > 75;
-- if an alias is specified, don't allow the original table name
-- to be referenced
DELETE FROM delete_test dt WHERE delete_test.a > 25;
SELECT * FROM delete_test;
DROP TABLE delete_test;