Re: [HACKERS] Extending System Views: proposal for 8.1/8.2

2005-01-24 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Marc G. Fournier wrote: >> I may be missing something here, but haven't we always stated that >> using 'SELECT *' should be frown'd upon for the most part? > No, we have never stated that. We do however point out in the docs that SELECT * is vulnerab

Re: [HACKERS] Extending System Views: proposal for 8.1/8.2

2005-01-24 Thread Peter Eisentraut
Marc G. Fournier wrote: > I may be missing something here, but haven't we always stated that > using 'SELECT *' should be frown'd upon for the most part? No, we have never stated that. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)

Re: [HACKERS] Extending System Views: proposal for 8.1/8.2

2005-01-23 Thread Tom Lane
"Jim C. Nasby" <[EMAIL PROTECTED]> writes: > Start with a clean plate. Yes, we'll end up with an ugly schema name, > but after the exiting pg_catalog is removed in a few versions, we can go > back to pg_catalog. Huh? pg_catalog isn't going away, and none of this discussion has anything to do with

Re: [HACKERS] Extending System Views: proposal for 8.1/8.2

2005-01-23 Thread Jim C. Nasby
I'm going to reply to 3 emails in one here... Out of Josh's 4 options, I think a new schema makes the most sense. Start with a clean plate. Yes, we'll end up with an ugly schema name, but after the exiting pg_catalog is removed in a few versions, we can go back to pg_catalog. The idea of using a

Re: [HACKERS] Extending System Views: proposal for 8.1/8.2

2005-01-23 Thread Yann Michel
Hi, On Sun, Jan 23, 2005 at 12:16:31PM -0800, Josh Berkus wrote: > > 4) ignore backwards compatibility and just re-write the old views. I can > hear the shouting already ... > > So, a choice of annoying options. Does anyone else on the channel have > opinions? Isn't it a usefull option to

Re: [HACKERS] Extending System Views: proposal for 8.1/8.2

2005-01-23 Thread Marc G. Fournier
I may be missing something here, but haven't we always stated that using 'SELECT *' should be frown'd upon for the most part? Is there a reason why adding a column/field to an existing view should be considered a bad thing? As long as we don't remove existing colums that an app could be using,

Re: [HACKERS] Extending System Views: proposal for 8.1/8.2

2005-01-23 Thread Josh Berkus
Tom, > Any new schemas introduced by PG itself will be named pg_something. > This is not open to negotiation --- it's what we've promised to users > to avoid tromping on their schema namespace. I can see the sense in that. So, there's four ways I can see to do things: 1) leave the existing view

Re: [HACKERS] Extending System Views: proposal for 8.1/8.2

2005-01-22 Thread Tom Lane
"Jim C. Nasby" <[EMAIL PROTECTED]> writes: > If we're dropping the pg_, maybe call the new schema just 'catalog'? Any new schemas introduced by PG itself will be named pg_something. This is not open to negotiation --- it's what we've promised to users to avoid tromping on their schema namespace.

Re: [HACKERS] Extending System Views: proposal for 8.1/8.2

2005-01-22 Thread Alvaro Herrera
On Sat, Jan 22, 2005 at 05:21:32PM -0600, Jim C. Nasby wrote: > 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. They are. >

Re: [HACKERS] Extending System Views: proposal for 8.1/8.2

2005-01-22 Thread lsunley
In <[EMAIL PROTECTED]>, on 01/22/05 at 05:21 PM, "Jim C. Nasby" <[EMAIL PROTECTED]> said: >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

Re: [HACKERS] Extending System Views: proposal for 8.1/8.2

2005-01-22 Thread Jim C. Nasby
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 objectio

Re: [HACKERS] Extending System Views: proposal for 8.1/8.2

2005-01-22 Thread Josh Berkus
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-fr

Re: [HACKERS] Extending System Views: proposal for 8.1/8.2

2005-01-22 Thread Tom Lane
"Josh Berkus" writes: > 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. Only if you put them in some other sch

Re: [HACKERS] Extending System Views: proposal for 8.1/8.2

2005-01-22 Thread Jim C. Nasby
On Sat, Jan 22, 2005 at 08:46:21PM +1100, Neil Conway wrote: > Jim C. Nasby wrote: > >On another naming note; the naming convention for system stuff has > >always driven me nuts. Some the letter prefix (ie: tab for tables) in > >front of every field name, with no underscores or anything. Extensive

Re: [HACKERS] Extending System Views: proposal for 8.1/8.2

2005-01-22 Thread Troels Arvin
On Fri, 21 Jan 2005 12:17:08 -0800, Josh Berkus wrote: > I'm proposing to expand both the coverage and number of "system views". Generally: Nice. But have you considered if the INFORMATION_SCHEMA could be used? Unfortunately, the INFORMATION_SCHEMA currently has a major problem in its usefulness

Re: [HACKERS] Extending System Views: proposal for 8.1/8.2

2005-01-22 Thread Neil Conway
Jim C. Nasby wrote: On another naming note; the naming convention for system stuff has always driven me nuts. Some the letter prefix (ie: tab for tables) in front of every field name, with no underscores or anything. Extensive use of abbreviations that you need to remember (ie: indnatts, indexprs,

Re: [HACKERS] Extending System Views: proposal for 8.1/8.2

2005-01-21 Thread Jim C. Nasby
I'm glad to see a types view. A while ago I was trying to figure out a way to query the pg_* views to see if a particular function existed. I quickly got stuck trying to figure out how to properly handle the arguments array. The solution Tom gave in this case was just to hard-code the OID for the t

Re: [HACKERS] Extending System Views: proposal for 8.1/8.2

2005-01-21 Thread David Fetter
On Fri, Jan 21, 2005 at 12:17:08PM -0800, Josh Berkus wrote: > Folks, > > This is for 8.1, or for 8.2 if we have a no-initdb cycle for 8.1.   > > I'm proposing to expand both the coverage and number of "system views".  Our > system views are an extremely useful way to get data about the system i