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

Appearance settings

Commit b2304a7

Browse filesBrowse 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 the referenced side at some point, effectively masking a bug this test tries to detect. Tom Lane and Jehan-Guillaume de Rorthais Discussion: https://postgr.es/m/467.1581270529@sss.pgh.pa.us
1 parent 53b01ac commit b2304a7
Copy full SHA for b2304a7

File tree

Expand file treeCollapse file tree

2 files changed

+10
-10
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+10
-10
lines changed

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

Copy file name to clipboardExpand all lines: src/test/regress/expected/foreign_key.out
+8-6Lines 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

Copy file name to clipboardExpand all lines: src/test/regress/sql/foreign_key.sql
+2-4Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1735,8 +1735,6 @@ CREATE SCHEMA fkpart9
17351735
INSERT INTO fkpart9.pk VALUES (35);
17361736
INSERT INTO fkpart9.fk VALUES (35);
17371737
DELETE FROM fkpart9.pk WHERE a=35;
1738-
SELECT fk.fk_a, pk.a
1739-
FROM fkpart9.fk
1740-
LEFT JOIN fkpart9.pk ON fk.fk_a = pk.a
1741-
WHERE fk.fk_a=35;
1738+
SELECT * FROM fkpart9.pk;
1739+
SELECT * FROM fkpart9.fk;
17421740
DROP SCHEMA fkpart9 CASCADE;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.