Re: Forward declaration of table - Mailing list pgsql-general

From David G. Johnston
Subject Re: Forward declaration of table
Date
Msg-id CAKFQuwZeOrDSiAK0GL9G1cvbx+5oLtzQhYuK2C=EEfWvKWWUHA@mail.gmail.com
Whole thread Raw
In response to Re: Forward declaration of table  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: Forward declaration of table  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
On Tue, Aug 23, 2016 at 1:24 PM, Adrian Klaver <adrian.klaver@aklaver.com> wrote:

use ALTER TABLE ADD table_constraint :

https://www.postgresql.org/docs/9.5/static/sql-altertable.html

to add the FK references to word_games.


​Hadn't considered "ALTER TABLE" but I'd be afraid of dump-restore hazards here.  Maybe pg_dump is smart enough to handle this correctly, though - maybe by adding constraint definitions after all tables and columns are present.

David J.​

pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Forward declaration of table
Next
From: Periko Support
Date:
Subject: Pentaho Odoo PSQL Slave.