1 CREATE TABLE delete_test (
5 NOTICE: CREATE TABLE will create implicit sequence "delete_test_id_seq" for serial column "delete_test.id"
6 NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "delete_test_pkey" for table "delete_test"
7 INSERT INTO delete_test (a) VALUES (10);
8 INSERT INTO delete_test (a) VALUES (50);
9 INSERT INTO delete_test (a) VALUES (100);
10 -- allow an alias to be specified for DELETE's target table
11 DELETE FROM delete_test AS dt WHERE dt.a > 75;
12 -- if an alias is specified, don't allow the original table name
15 SET LOCAL add_missing_from = false;
16 DELETE FROM delete_test dt WHERE delete_test.a > 25;
17 ERROR: invalid reference to FROM-clause entry for table "delete_test"
18 LINE 1: DELETE FROM delete_test dt WHERE delete_test.a > 25;
20 HINT: Perhaps you meant to reference the table alias "dt".
22 SELECT * FROM delete_test;
29 DROP TABLE delete_test;