pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Karsten Hilbert <Karsten.Hilbert@gmx.net>
To: pgsql-general@lists.postgresql.org
Subject: Re: PostgreSQL - Ordering Table based of Foreign Key
Date: Sun, 3 Oct 2021 10:45:38 +0200
Message-ID: <YVltssGwKTXiqVbK@hermes.hilbert.loc> (raw)
In-Reply-To: <CAHQ1jfekP6=H-sEzBucctW4kF-jWyEo_rXRDGVsth3EtMQ5aSg@mail.gmail.com>
References: <CAHQ1jfekP6=H-sEzBucctW4kF-jWyEo_rXRDGVsth3EtMQ5aSg@mail.gmail.com>

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





view thread (10+ messages)  latest in thread

Message-ID: <YVltssGwKTXiqVbK@hermes.hilbert.loc>
Permalink:  ../YVltssGwKTXiqVbK@hermes.hilbert.loc/
Also on:    postgresql.org/message-id/YVltssGwKTXiqVbK@hermes.hilbert.loc

 · 

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: Karsten.Hilbert@gmx.net
  Subject: Re: PostgreSQL - Ordering Table based of Foreign Key
  In-Reply-To: <YVltssGwKTXiqVbK@hermes.hilbert.loc>
  References: <CAHQ1jfekP6=H-sEzBucctW4kF-jWyEo_rXRDGVsth3EtMQ5aSg@mail.gmail.com> <YVltssGwKTXiqVbK@hermes.hilbert.loc>

* 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