Re: BUG #13224: Foreign key constraints cannot be changed to deferrable - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #13224: Foreign key constraints cannot be changed to deferrable
Date
Msg-id 18844.1430662618@sss.pgh.pa.us
Whole thread Raw
In response to BUG #13224: Foreign key constraints cannot be changed to deferrable  (chris@chrullrich.net)
List pgsql-bugs
chris@chrullrich.net writes:
> According to the manual, ALTER TABLE ... ALTER CONSTRAINT ... DEFERRABLE
> should work. It does not, according to the script below.

Hm.  It works fine if you cause a reconnect (\c) after the ALTER TABLE.
I suspect the problem is that ATExecAlterConstraint forces a relcache
inval on the named table (detail), but neglects to do so on the other
table (master).  The session's cached pg_trigger records for master thus
still say the triggers are nondeferrable.

            regards, tom lane

pgsql-bugs by date:

Previous
From: chris@chrullrich.net
Date:
Subject: BUG #13224: Foreign key constraints cannot be changed to deferrable
Next
From: Tom Lane
Date:
Subject: Re: Failure to coerce unknown type to specific type