postgresql/src/test/regress/expected/update.out

26 lines
407 B
Plaintext
Raw Normal View History

--
-- UPDATE ... SET <col> = DEFAULT;
--
CREATE TABLE update_test (
a INT DEFAULT 10,
b INT
);
INSERT INTO update_test VALUES (5, 10);
INSERT INTO update_test VALUES (10, 15);
SELECT * FROM update_test;
a | b
----+----
5 | 10
10 | 15
(2 rows)
UPDATE update_test SET a = DEFAULT, b = DEFAULT;
SELECT * FROM update_test;
a | b
----+---
10 |
10 |
(2 rows)
DROP TABLE update_test;