Re: [pgsql-hackers] Re: Extending System Views: proposal for 8.1/8.2

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
Subject: Re: [pgsql-hackers] Re: Extending System Views: proposal for 8.1/8.2
Date: 2005-01-23 22:37:28
Message-ID: 200501231437.28995.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jim,

> It's a question of if these views will also be used programatically.
> ISTM that OIDs are the preffered method of refering to things in code
> (in fact, aren't there some functions that only take OIDs?). If we want
> to make names the cannonical way to reference things in code, then I
> agree that there's not much use to OIDs.

Hmmm .... I think that you and I have different ideas about the purpose of the
system views. My idea is to provide a stable (through multiple versions of
pg), human-readable view of the system objects. You obviously want to do
more -- I'd like details on what that more is, so that we can talk about it.

> Is the long term plan to remove OIDs entirely?

No, but we want to discourage users from using them actively. Where they're
apparent, users will be inclined to write code that references OIDs *by
number* which will survive neither backup/restore, nor upgrades in pg
versions. So where we can encourage users to refer to objects by name, we
should. I see the OIDs, in fact, as one of the reasons to create the
additional system views -- so that users aren't confused by them.

If there are functions that need OIDs, my inclination would be to write shell
functions for those that accept fully-qualified object names.

--
Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim C. Nasby 2005-01-23 22:45:26 Re: [pgsql-hackers] Re: Extending System Views: proposal for 8.1/8.2
Previous Message Stephen Frost 2005-01-23 22:20:11 Re: [PATCHES] Merge pg_shadow && pg_group -- UNTESTED