Simplify FK-to-partitioned regression test query

Alvaro Herrera <alvherre@alvh.no-ip.org>

Commit: 3f50d5ced3f854119862b1ce60a6f3c5d38a4386
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2020-02-20T17:14:20Z
Releases: 12.3
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

Files

Discussion