From: Stephen Frost <sfrost@snowman.net>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Add pg_sequence system catalog
Date: Tue, 24 Jan 2017 10:23:21 -0500
Message-ID: <20170124152321.GT18360@tamriel.snowman.net> (raw)
In-Reply-To: <1b722fdc-7f69-9033-2bed-34e318d61a74@2ndquadrant.com>
References: <E1cJKgv-0004eC-KE@gemulon.postgresql.org>
<20170119160305.GS18360@tamriel.snowman.net>
<1b722fdc-7f69-9033-2bed-34e318d61a74@2ndquadrant.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Peter,
* Peter Eisentraut (peter.eisentraut@2ndquadrant.com) wrote:
> On 1/19/17 11:03 AM, Stephen Frost wrote:
> > I'd suggest using our usual approach in pg_dump, which is matching based
> > on the OID, like so:
> >
> > WHERE c.oid = '%u'::oid
> >
> > The OID is in: tbinfo->dobj.catId.oid
> >
> > Also, you should move the selectSourceSchema() into the per-version
> > branches and set it to 'pg_catalog' for PG10 and up, which would allow
> > you to avoid having to qualify the table names, et al.
>
> Does the attached patch look correct to you?
On a one-over, yes, that looks correct and avoids the issue of running
in a user's schema.
It wouldn't hurt to add a comment as to why things are so different in
PG10 than other versions, ie:
/*
* In PG10, sequence meta-data was moved into pg_sequence, so switch to
* the pg_catalog schema instead of operating in a user schema and pull
* the necessary meta-data from there.
*/
Thanks!
Stephen
Attachments:
signature.asc (application/pgp-signature, 818B) 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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: sfrost@snowman.net, peter.eisentraut@2ndquadrant.com
Subject: Re: [COMMITTERS] pgsql: Add pg_sequence system catalog
In-Reply-To: <20170124152321.GT18360@tamriel.snowman.net>
* 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