Re: Extending System Views: proposal for 8.1/8.2 - Mailing list pgsql-hackers

From Jim C. Nasby
Subject Re: Extending System Views: proposal for 8.1/8.2
Date
Msg-id 20050122232132.GS67721@decibel.org
Whole thread Raw
In response to Re: Extending System Views: proposal for 8.1/8.2  ("Josh Berkus" <josh@agliodbs.com>)
Responses Re: Extending System Views: proposal for 8.1/8.2  (lsunley@mb.sympatico.ca)
Re: Extending System Views: proposal for 8.1/8.2  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Re: Extending System Views: proposal for 8.1/8.2  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sat, Jan 22, 2005 at 01:36:54PM -0800, Josh Berkus wrote:
> Jim,
> 
> > Just to be clear, I'm not suggesting renaming anything in any of the
> > existing pg_catalog objects. I'm suggesting creating a new, easier to
> > use set of views that would sit on top of pg_catalog.
> 
> I have no objection to using easier to read names for the system views.
>  (This is the user-friendly views, folks, not the actual system
> objects!).   The reason I suggested the names I did was to be
> consistent.

Out of curiosity, what's the relation between the tables in pg_catalog
and the 'actual system objects'? I ass-u-me'd that these tables were the
backing store for the real information, but maybe that's not the case.

> Thing is, at least for the next version, if we are changing the naming
> conventions, we need to leave the old views alone, at least for one
> version (pg_tables, pg_views, etc.).  This means a new view name scheme
> for the new views.  Suggestions?  

If we're dropping the pg_, maybe call the new schema just 'catalog'?

> I might suggest simply "tables" "triggers" "types" etc.   The plurals
> of these reserved words are no, AFAIK, reserved.  And if users are
> creating identically named objects in public, they just need to
> remember to use the schema.

Actually, the view names don't bother me at all. Granted, pg_ is 3 extra
characters to type, but the names are crystal clear. What I don't like
are the field names inside the views, and especially inside the
pg_catalog tables.

> Oh, also for the "Parameters (array)" etc.?   I was planning on having
> text names there, *not* an array of OIDs or whatever.   The purpose of
> these views is to be user-friendly.

I think these views are also very useful in certain programming
situations, in which also having the OIDs might be very useful. Another
option would be to have functions that given a array of names would
return a array of OIDs.
-- 
Jim C. Nasby, Database Consultant               decibel@decibel.org 
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Locale agnostic unicode text
Next
From: lsunley@mb.sympatico.ca
Date:
Subject: Re: Extending System Views: proposal for 8.1/8.2