Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb2304a7

Browse files
committed
Simplify FK-to-partitioned regression test query
Avoid a join between relations having the FK to detect FK violation.The planner might optimize this considering the PK must exist on thereferenced side at some point, effectively masking a bug this testtries to detect.Tom Lane and Jehan-Guillaume de RorthaisDiscussion:https://postgr.es/m/467.1581270529@sss.pgh.pa.us
1 parent53b01ac commitb2304a7

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

‎src/test/regress/expected/foreign_key.out

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2456,12 +2456,14 @@ CREATE SCHEMA fkpart9
24562456
INSERT INTO fkpart9.pk VALUES (35);
24572457
INSERT INTO fkpart9.fk VALUES (35);
24582458
DELETE FROM fkpart9.pk WHERE a=35;
2459-
SELECT fk.fk_a, pk.a
2460-
FROM fkpart9.fk
2461-
LEFT JOIN fkpart9.pk ON fk.fk_a = pk.a
2462-
WHERE fk.fk_a=35;
2463-
fk_a | a
2464-
------+---
2459+
SELECT * FROM fkpart9.pk;
2460+
a
2461+
---
2462+
(0 rows)
2463+
2464+
SELECT * FROM fkpart9.fk;
2465+
fk_a
2466+
------
24652467
(0 rows)
24662468

24672469
DROP SCHEMA fkpart9 CASCADE;

‎src/test/regress/sql/foreign_key.sql

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1735,8 +1735,6 @@ CREATE SCHEMA fkpart9
17351735
INSERT INTOfkpart9.pkVALUES (35);
17361736
INSERT INTOfkpart9.fkVALUES (35);
17371737
DELETEFROMfkpart9.pkWHERE a=35;
1738-
SELECTfk.fk_a,pk.a
1739-
FROMfkpart9.fk
1740-
LEFT JOINfkpart9.pkONfk.fk_a=pk.a
1741-
WHEREfk.fk_a=35;
1738+
SELECT*FROMfkpart9.pk;
1739+
SELECT*FROMfkpart9.fk;
17421740
DROPSCHEMA fkpart9 CASCADE;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp