diff --git a/src/test/regress/expected/update.out b/src/test/regress/expected/update.out new file mode 100644 index 0000000000..3fca2fb41a --- /dev/null +++ b/src/test/regress/expected/update.out @@ -0,0 +1,25 @@ +-- +-- UPDATE ... SET = 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; diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule index 913c4cba0c..974dd2ee65 100644 --- a/src/test/regress/parallel_schedule +++ b/src/test/regress/parallel_schedule @@ -60,7 +60,7 @@ ignore: random # ---------- # The fourth group of parallel test # ---------- -test: select_into select_distinct select_distinct_on select_implicit select_having subselect union case join aggregates transactions random portals arrays btree_index hash_index +test: select_into select_distinct select_distinct_on select_implicit select_having subselect union case join aggregates transactions random portals arrays btree_index hash_index update test: privileges test: misc diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule index d3ae9f5ddb..c3a9fd726b 100644 --- a/src/test/regress/serial_schedule +++ b/src/test/regress/serial_schedule @@ -1,4 +1,4 @@ -# $Header: /cvsroot/pgsql/src/test/regress/serial_schedule,v 1.20 2003/07/01 19:10:53 tgl Exp $ +# $Header: /cvsroot/pgsql/src/test/regress/serial_schedule,v 1.21 2003/08/26 18:32:23 momjian Exp $ # This should probably be in an order similar to parallel_schedule. test: boolean test: char @@ -72,6 +72,7 @@ test: portals test: arrays test: btree_index test: hash_index +test: update test: privileges test: misc test: select_views diff --git a/src/test/regress/sql/update.sql b/src/test/regress/sql/update.sql new file mode 100644 index 0000000000..64e0f81914 --- /dev/null +++ b/src/test/regress/sql/update.sql @@ -0,0 +1,19 @@ +-- +-- UPDATE ... SET = 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; + +UPDATE update_test SET a = DEFAULT, b = DEFAULT; + +SELECT * FROM update_test; + +DROP TABLE update_test; \ No newline at end of file