Re: TRUNCATE ONLY with foreign keys and triggers disabled

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Dimitrios Apostolou <jimis(at)gmx(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: TRUNCATE ONLY with foreign keys and triggers disabled
Date: 2025-04-14 15:07:58
Message-ID: 6776dc7beaf591a684d089db4c77407b7a2866c4.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 2025-04-14 at 17:05 +0200, Dimitrios Apostolou wrote:
> I meant the *referencing* table has just been
> populated. I'm trying to delete the *referenced* table and I get the
> error.

That would break the foreign key constraint, right?
PostgreSQL cannot allow that.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2025-04-14 15:13:56 Re: TRUNCATE ONLY with foreign keys and triggers disabled
Previous Message Dimitrios Apostolou 2025-04-14 15:05:12 Re: TRUNCATE ONLY with foreign keys and triggers disabled