diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2008-11-15 19:43:47 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2008-11-15 19:43:47 +0000 |
| commit | 0656ed3daa29b00c7c41ad44b407a7165f83d453 (patch) | |
| tree | 2167bd78fa501c3ffed1d0de842ded643c32500b /src/test | |
| parent | 07c179a82b39ffbc172175382717706d90c714cd (diff) | |
| download | postgresql-0656ed3daa29b00c7c41ad44b407a7165f83d453.tar.gz | |
Make SELECT FOR UPDATE/SHARE work on inheritance trees, by having the plan
return the tableoid as well as the ctid for any FOR UPDATE targets that
have child tables. All child tables are listed in the ExecRowMark list,
but the executor just skips the ones that didn't produce the current row.
Curiously, this longstanding restriction doesn't seem to have been documented
anywhere; so no doc changes.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/regress/expected/portals.out | 2 | ||||
| -rw-r--r-- | src/test/regress/sql/portals.sql | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/test/regress/expected/portals.out b/src/test/regress/expected/portals.out index 63b8a8be56..66563615d8 100644 --- a/src/test/regress/expected/portals.out +++ b/src/test/regress/expected/portals.out @@ -1118,7 +1118,7 @@ SELECT * FROM uctest; (3 rows) BEGIN; -DECLARE c1 CURSOR FOR SELECT * FROM uctest; +DECLARE c1 CURSOR FOR SELECT * FROM uctest FOR UPDATE; FETCH 1 FROM c1; f1 | f2 ----+------- diff --git a/src/test/regress/sql/portals.sql b/src/test/regress/sql/portals.sql index 63a689666a..b53eaac786 100644 --- a/src/test/regress/sql/portals.sql +++ b/src/test/regress/sql/portals.sql @@ -393,7 +393,7 @@ INSERT INTO ucchild values(100, 'hundred'); SELECT * FROM uctest; BEGIN; -DECLARE c1 CURSOR FOR SELECT * FROM uctest; +DECLARE c1 CURSOR FOR SELECT * FROM uctest FOR UPDATE; FETCH 1 FROM c1; UPDATE uctest SET f1 = f1 + 10 WHERE CURRENT OF c1; FETCH 1 FROM c1; |
