summaryrefslogtreecommitdiff
path: root/src/test/regress/expected/update.out
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2003-08-26 18:32:23 +0000
committerBruce Momjian <bruce@momjian.us>2003-08-26 18:32:23 +0000
commit1e100176c47f0ba765f220490ac431dfc9fbd240 (patch)
treedb608524911b1be8def084f978eb38dde7ccf3cf /src/test/regress/expected/update.out
parent47a4e2ed1c53fa23a7a401308109b0352d29f997 (diff)
downloadpostgresql-1e100176c47f0ba765f220490ac431dfc9fbd240.tar.gz
This patch adds a new regression test for the UPDATE command. Right
now all that is tested is Rod Taylor's recent addition to allow this syntax: UPDATE ... SET <col> = DEFAULT; If anyone else would like to add more UPDATE tests, go ahead -- I just wanted to write a test for the above functionality, and couldn't see an existing test that it would be appropriate to add to. Neil Conway
Diffstat (limited to 'src/test/regress/expected/update.out')
-rw-r--r--src/test/regress/expected/update.out25
1 files changed, 25 insertions, 0 deletions
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 <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;