mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +03:00
Restore erroneously removed ONLY from PK check
This is a blind fix, since I don't have SE-Linux to verify it. Per unwanted change in rhinoceros, running sepgsql tests. Noted by Tom Lane. Discussion: https://postgr.es/m/32347.1522865050@sss.pgh.pa.us
This commit is contained in:
@ -1915,7 +1915,7 @@ RI_Initial_Check(Trigger *trigger, Relation fk_rel, Relation pk_rel)
|
||||
/*----------
|
||||
* The query string built is:
|
||||
* SELECT fk.keycols FROM [ONLY] relname fk
|
||||
* LEFT OUTER JOIN pkrelname pk
|
||||
* LEFT OUTER JOIN ONLY pkrelname pk
|
||||
* ON (pk.pkkeycol1=fk.keycol1 [AND ...])
|
||||
* WHERE pk.pkkeycol1 IS NULL AND
|
||||
* For MATCH SIMPLE:
|
||||
@ -1943,7 +1943,7 @@ RI_Initial_Check(Trigger *trigger, Relation fk_rel, Relation pk_rel)
|
||||
fk_only = fk_rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE ?
|
||||
"" : "ONLY ";
|
||||
appendStringInfo(&querybuf,
|
||||
" FROM %s%s fk LEFT OUTER JOIN %s pk ON",
|
||||
" FROM %s%s fk LEFT OUTER JOIN ONLY %s pk ON",
|
||||
fk_only, fkrelname, pkrelname);
|
||||
|
||||
strcpy(pkattname, "pk.");
|
||||
|
Reference in New Issue
Block a user