Re: [COMMITTERS] pgsql: Add pg_sequence system catalog

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Add pg_sequence system catalog
Date: 2017-01-24 15:23:21
Message-ID: 20170124152321.GT18360@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Peter,

* Peter Eisentraut (peter(dot)eisentraut(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2017-01-24 15:25:37 pgsql: Reindent table partitioning code.
Previous Message Peter Eisentraut 2017-01-24 15:08:21 Re: [COMMITTERS] pgsql: Add pg_sequence system catalog

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-01-24 15:25:37 pgsql: Reindent table partitioning code.
Previous Message Peter Eisentraut 2017-01-24 15:08:21 Re: [COMMITTERS] pgsql: Add pg_sequence system catalog