pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Deferrable FK not behaving as expected.
Date: Mon, 7 Dec 2020 13:17:31 -0800
Message-ID: <eb27d48a-9213-11ff-bfdf-bdd44c64d4ab@aklaver.com> (raw)
In-Reply-To: <76fc2246-e88f-a97d-c601-8e68cf45e6dc@gmail.com>
References: <75fe0761-a291-86a9-c8d8-4906da077469@gmail.com>
	<b97cbd9d-1615-c9e1-aff1-683a37fedee9@gmx.net>
	<3c32cc9c-1589-7f22-b9e3-f4bcccbaf87e@gmail.com>
	<3144564.1607369236@sss.pgh.pa.us>
	<76fc2246-e88f-a97d-c601-8e68cf45e6dc@gmail.com>

On 12/7/20 1:15 PM, Ron wrote:
> On 12/7/20 1:27 PM, Tom Lane wrote:
>> Ron <ronljohnsonjr@gmail.com> writes:
>>> Neither technique worked.
>>> test=# ALTER TABLE sales_detail ALTER CONSTRAINT
>>> fk_sales_detail_sales_header DEFERRABLE INITIALLY DEFERRED;
>>> ALTER TABLE
>> Hmm, reproduced here.  There seems to be some kind of bug
>> in ALTER CONSTRAINT ---
> 
> Do I need to file a bug report?

No:

https://www.postgresql.org/message-id/3144850.1607369633%40sss.pgh.pa.us
> 
>>   it looks like it's updated all the
>> child FKs successfully, but it actually hasn't.  If you
>> drop the FK constraint altogether, and recreate it having
>> DEFERRABLE INITIALLY DEFERRED from the start, it should
>> work --- at least it does for me.
> 
> That worked.
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (10+ messages)  latest in thread

Message-ID: <eb27d48a-9213-11ff-bfdf-bdd44c64d4ab@aklaver.com>
Permalink:  ../eb27d48a-9213-11ff-bfdf-bdd44c64d4ab@aklaver.com/
Also on:    postgresql.org/message-id/eb27d48a-9213-11ff-bfdf-bdd44c64d4ab@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, ronljohnsonjr@gmail.com
  Subject: Re: Deferrable FK not behaving as expected.
  In-Reply-To: <eb27d48a-9213-11ff-bfdf-bdd44c64d4ab@aklaver.com>
  References: <75fe0761-a291-86a9-c8d8-4906da077469@gmail.com> <b97cbd9d-1615-c9e1-aff1-683a37fedee9@gmx.net> <3c32cc9c-1589-7f22-b9e3-f4bcccbaf87e@gmail.com> <3144564.1607369236@sss.pgh.pa.us> <76fc2246-e88f-a97d-c601-8e68cf45e6dc@gmail.com> <eb27d48a-9213-11ff-bfdf-bdd44c64d4ab@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox