Re: PostgreSQL - Ordering Table based of Foreign Key

From: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: PostgreSQL - Ordering Table based of Foreign Key
Date: 2021-10-03 08:45:38
Message-ID: YVltssGwKTXiqVbK@hermes.hilbert.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Am Sun, Oct 03, 2021 at 08:48:13AM +0100 schrieb FOUTE K. Jaurès:

> I want to order tables based on the foreign key so that I can delete tables
> one by one without facing "ERROR: update or delete on table "table"
> violates foreign key constraint. DETAIL: Key is still referenced from table"

drop table if exists ... cascade;

Karsten
--
GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2021-10-03 08:49:49 Re: PostgreSQL - Ordering Table based of Foreign Key
Previous Message FOUTE K. Jaurès 2021-10-03 07:48:13 PostgreSQL - Ordering Table based of Foreign Key