diff options
| author | Bruce Momjian <bruce@momjian.us> | 2003-08-26 18:32:23 +0000 |
|---|---|---|
| committer | Bruce Momjian <bruce@momjian.us> | 2003-08-26 18:32:23 +0000 |
| commit | 1e100176c47f0ba765f220490ac431dfc9fbd240 (patch) | |
| tree | db608524911b1be8def084f978eb38dde7ccf3cf /src/test/regress/sql/update.sql | |
| parent | 47a4e2ed1c53fa23a7a401308109b0352d29f997 (diff) | |
| download | postgresql-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/sql/update.sql')
| -rw-r--r-- | src/test/regress/sql/update.sql | 19 |
1 files changed, 19 insertions, 0 deletions
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 <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; + +UPDATE update_test SET a = DEFAULT, b = DEFAULT; + +SELECT * FROM update_test; + +DROP TABLE update_test;
\ No newline at end of file |
