Original coding of 'returning' regression test inadvertently chose a

nonunique join value, leading to plan-choice-dependent results ... and
it seems some platforms will choose a different plan.  Tweak the test
so that it has well-defined results.  Per report from Olivier Prenant.
This commit is contained in:
Tom Lane 2006-08-13 17:58:49 +00:00
parent 12cf0fdf19
commit d2ccc707af
2 changed files with 10 additions and 10 deletions

View File

@ -152,11 +152,11 @@ SELECT * FROM foochild;
UPDATE foo SET f3 = f3*2
FROM int8_tbl i
WHERE foo.f1 = i.q1
WHERE foo.f1 = i.q2
RETURNING *;
f1 | f2 | f3 | f4 | q1 | q2
-----+-------+------+------+-----+-----
123 | child | 1998 | 1098 | 123 | 456
f1 | f2 | f3 | f4 | q1 | q2
-----+-------+------+------+------------------+-----
123 | child | 1998 | 1098 | 4567890123456789 | 123
(1 row)
SELECT * FROM foo;
@ -174,11 +174,11 @@ SELECT * FROM foochild;
DELETE FROM foo
USING int8_tbl i
WHERE foo.f1 = i.q1
WHERE foo.f1 = i.q2
RETURNING *;
f1 | f2 | f3 | f4 | q1 | q2
-----+-------+------+------+-----+-----
123 | child | 1998 | 1098 | 123 | 456
f1 | f2 | f3 | f4 | q1 | q2
-----+-------+------+------+------------------+-----
123 | child | 1998 | 1098 | 4567890123456789 | 123
(1 row)
SELECT * FROM foo;

View File

@ -70,7 +70,7 @@ SELECT * FROM foochild;
UPDATE foo SET f3 = f3*2
FROM int8_tbl i
WHERE foo.f1 = i.q1
WHERE foo.f1 = i.q2
RETURNING *;
SELECT * FROM foo;
@ -78,7 +78,7 @@ SELECT * FROM foochild;
DELETE FROM foo
USING int8_tbl i
WHERE foo.f1 = i.q1
WHERE foo.f1 = i.q2
RETURNING *;
SELECT * FROM foo;