PostgreSQL Bugs

Collected from the PG bugs email list.

Bug ID16088
PG Version12.0
OSRHEL 7.7
Opened2019-10-29 15:26:19+00
Reported byJess Sturgeon
StatusNew

Body of first available message related to this bug follows.

The following bug has been logged on the website:

Bug reference:      16088
Logged by:          Jess Sturgeon
Email address:      (redacted)
PostgreSQL version: 12.0
Operating system:   RHEL 7.7
Description:        

If you run this command multiple times:

ALTER TABLE myschema.mytable ADD IF NOT EXISTS mycolumn uuid REFERENCES
myschema.mytable2(userid);

It adds the column once, but adds a duplicate FOREIGN KEY each time.  I had
over 59 keys while debugging my schema definition :)

This happens in PG11.5 and PG12 for me, both on RHEL 7.7

Messages

DateAuthorSubject
2019-10-29 15:26:19+00PG Bug reporting formBUG #16088: Multiple foreigh keys created on "ALTER TABLE" command
2019-10-29 15:37:05+00Tom LaneRe: BUG #16088: Multiple foreigh keys created on "ALTER TABLE" command