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

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: [pgsql-hackers] Re: Extending System Views: proposal for 8.1/8.2
Дата
Msg-id 200501231437.28995.josh@agliodbs.com
обсуждение исходный текст
Ответ на Re: [pgsql-hackers] Re: Extending System Views: proposal for 8.1/8.2  ("Jim C. Nasby" <decibel@decibel.org>)
Ответы Re: [pgsql-hackers] Re: Extending System Views: proposal for 8.1/8.2  ("Jim C. Nasby" <decibel@decibel.org>)
Список 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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: [PATCHES] Merge pg_shadow && pg_group -- UNTESTED
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: [pgsql-hackers] Re: Extending System Views: proposal for 8.1/8.2