From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Julien Rouhaud <rjuju123@gmail.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Avoid useless retrieval of defaults and check constraints in pg_dump -a
Date: Tue, 15 Sep 2020 12:08:34 +0900
Message-ID: <20200915030834.GL2183@paquier.xyz> (raw)
In-Reply-To: <1234545.1600138561@sss.pgh.pa.us>
References: <20200712054850.GA92357@nol>
<20200712142921.GA26220@telsasoft.com>
<CAOBaU_beGQEv6nJCQ-cDnHeC6hew-WaLjFyf-Snz_-rzATyGtQ@mail.gmail.com>
<20200915023320.GI2183@paquier.xyz>
<1234545.1600138561@sss.pgh.pa.us>
On Mon, Sep 14, 2020 at 10:56:01PM -0400, Tom Lane wrote:
> (Note that we disallow sub-queries in CHECK constraints, and also
> disclaim responsibility for what happens if you cheat by hiding
> the subquery in a function. So while it's certainly possible to
> build CHECK constraints that only work if table X is loaded before
> table Y, pg_dump already doesn't guarantee that'll work, --data-only
> or otherwise.)
Yep, exactly what I was thinking upthread by cheating with a schema
having cross-table references in a check constraint.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
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-hackers@postgresql.org
Cc: michael@paquier.xyz, tgl@sss.pgh.pa.us, rjuju123@gmail.com, pryzby@telsasoft.com
Subject: Re: Avoid useless retrieval of defaults and check constraints in pg_dump -a
In-Reply-To: <20200915030834.GL2183@paquier.xyz>
References: <20200712054850.GA92357@nol> <20200712142921.GA26220@telsasoft.com> <CAOBaU_beGQEv6nJCQ-cDnHeC6hew-WaLjFyf-Snz_-rzATyGtQ@mail.gmail.com> <20200915023320.GI2183@paquier.xyz> <1234545.1600138561@sss.pgh.pa.us> <20200915030834.GL2183@paquier.xyz>
* 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