From: Stephen Frost <sfrost@snowman.net>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: [RFC] Removing "magic" oids
Date: Tue, 20 Nov 2018 11:25:22 -0500
Message-ID: <20181120162521.GD3415@tamriel.snowman.net> (raw)
In-Reply-To: <CA+TgmobdjG8oKHNrJNhMPUYUV33k0cqrf8SwT9XtLEsv2gmbyw@mail.gmail.com>
References: <20180930034810.ywp2c7awz7opzcfr@alap3.anarazel.de>
<20181014220923.j4mlgue7y7chv533@alap3.anarazel.de>
<943.1539556490@sss.pgh.pa.us>
<CA+TgmobdjG8oKHNrJNhMPUYUV33k0cqrf8SwT9XtLEsv2gmbyw@mail.gmail.com>
Greetings,
* Robert Haas (robertmhaas@gmail.com) wrote:
> On Sun, Oct 14, 2018 at 6:35 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > Andres Freund <andres@anarazel.de> writes:
> > > Does anybody have engineering / architecture level comments about this
> > > proposal?
> >
> > FWIW, I'm -1 on making OIDs be not-magic for SELECT purposes. Yeah, it's
> > a wart we wouldn't have if we designed the system today, but the wart is
> > thirty years old. I think changing that will break so many catalog
> > queries that we'll have the villagers on the doorstep. Most of the other
> > things you're suggesting here could be done easily without making that
> > change.
> >
> > Possibly we could make them not-magic from the storage standpoint (ie
> > they're regular columns) but have a pg_attribute flag that says not
> > to include them in "SELECT *" expansion.
>
> I think such a flag would be a good idea; it seems to have other uses.
> As Andres also noted, Kevin was quite interested in having a
> hidden-by-default COUNT column to assist with materialized view
> maintenance, and presumably this could also be used for that purpose.
Yeah, I like the idea of having this column too, it'd also be useful for
people who are trying to use column-level privileges.
> I am less sure that it's a good idea that it's a good idea to set that
> flag for the OID columns in system catalogs. I do think that some
> tool authors are likely to have to do some significant work to update
> their tools, but a lot of tools are probably already querying for
> specific columns, not using *, so they'll be fine. And like Andres
> says, it seems like we'll be happier in the long term if we get way
> from having OID columns be invisible in system catalogs. That's just
> confusing.
Tools should *really* be using explicit column names and not just
'SELECT *' (and my experience is that most of them are using explicit
column names in their queries- sometimes to explicitly pull out the oid
column since it's so frequently needed...). I suppose if we wanted to
get fancy we could allow users to adjust the setting on catalog tables
themselves... I'd certainly be happier with the OID columns being
visible by SELECT * against the catalog tables though.
By my reckoning, we'll break a lot fewer tools/queries with this change
than the changes we made for xlog -> wal and location -> lsn in various
tables and functions with v10.
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, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, andres@anarazel.de
Subject: Re: [RFC] Removing "magic" oids
In-Reply-To: <20181120162521.GD3415@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