Re: [HACKERS] Get rid of system attributes in pg_attribute?

2005-02-22 Thread Robert Treat
On Monday 21 February 2005 04:23, Christopher Kings-Lynne wrote: I'm wondering how useful it is to store explicit representations of the system attributes in pg_attribute. We could very easily hard-wire those things instead, which would make for a large reduction in the number of entries

Re: [HACKERS] Get rid of system attributes in pg_attribute?

2005-02-22 Thread Robert Treat
On Sunday 20 February 2005 12:30, Tom Lane wrote: Robert Treat [EMAIL PROTECTED] writes: One of us is not understanding the other :-) I'm asking if I have a piece of code that does something like select attname from pg_attribute where attrelid = 'stock'::regclass::oid with the intent of

Re: [HACKERS] Get rid of system attributes in pg_attribute?

2005-02-22 Thread Tom Lane
Robert Treat [EMAIL PROTECTED] writes: Does anyone know of client code that actually pays attention to pg_attribute rows with negative attnums? Well, the corner case would be for those times when we use oid for updating specific rows in a table, if a user creates there own oid column then

Re: [HACKERS] Get rid of system attributes in pg_attribute?

2005-02-22 Thread Robert Treat
On Tuesday 22 February 2005 10:32, Tom Lane wrote: Robert Treat [EMAIL PROTECTED] writes: Does anyone know of client code that actually pays attention to pg_attribute rows with negative attnums? Well, the corner case would be for those times when we use oid for updating specific rows

Re: [HACKERS] Get rid of system attributes in pg_attribute?

2005-02-22 Thread Tom Lane
Robert Treat [EMAIL PROTECTED] writes: On Tuesday 22 February 2005 10:32, Tom Lane wrote: Probably ctid is the more interesting case; I'm pretty sure ODBC relies on ctid as a short-term-unique row identifier. Yeah... how many utility tools out there reference system columns explicitly? I

Re: [HACKERS] Get rid of system attributes in pg_attribute?

2005-02-22 Thread Andreas Pflug
Tom Lane wrote: Well, that probably knocks out my thought that we could stop reserving the system column names (at least ctid and xmin, which are the two that actually seem useful to ordinary clients, need to stay reserved). But it still seems like we don't have to represent these columns

Re: [HACKERS] Get rid of system attributes in pg_attribute?

2005-02-22 Thread Tom Lane
Andreas Pflug [EMAIL PROTECTED] writes: Tom Lane wrote: it still seems like we don't have to represent these columns explicitly in pg_attribute. Hm, technically you might be right. Still, I like pgAdmin3 to show that columns (when show system objects is enabled) for teaching purposes, so

Re: [HACKERS] Get rid of system attributes in pg_attribute?

2005-02-22 Thread Andreas Pflug
Tom Lane wrote: Andreas Pflug [EMAIL PROTECTED] writes: Tom Lane wrote: it still seems like we don't have to represent these columns explicitly in pg_attribute. Hm, technically you might be right. Still, I like pgAdmin3 to show that columns (when show system objects is enabled) for teaching

Re: [HACKERS] Get rid of system attributes in pg_attribute?

2005-02-21 Thread Christopher Kings-Lynne
I'm wondering how useful it is to store explicit representations of the system attributes in pg_attribute. We could very easily hard-wire those things instead, which would make for a large reduction in the number of entries in pg_attribute. (In the current regression database nearly half of the

Re: [HACKERS] Get rid of system attributes in pg_attribute?

2005-02-21 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 It occurs to me that without the explicit entries, we could stop considering the system names to be reserved column names --- that is, we could allow users to create ordinary columns by these names. (The procedure for looking up a column name

Re: [HACKERS] Get rid of system attributes in pg_attribute?

2005-02-20 Thread Robert Treat
On Sunday 20 February 2005 00:25, Tom Lane wrote: Robert Treat [EMAIL PROTECTED] writes: If I am understanding this correctly, they could only be displayed if selected explicitly right? That's always been true. The behavior at the level of SQL commands wouldn't change. The question is

Re: [HACKERS] Get rid of system attributes in pg_attribute?

2005-02-20 Thread Tom Lane
Robert Treat [EMAIL PROTECTED] writes: One of us is not understanding the other :-) I'm asking if I have a piece of code that does something like select attname from pg_attribute where attrelid = 'stock'::regclass::oid with the intent of displaying all those attnames, then the system atts

Re: [HACKERS] Get rid of system attributes in pg_attribute?

2005-02-19 Thread Andreas Pflug
Dave Page wrote: Does anyone know of client code that actually pays attention to pg_attribute rows with negative attnums? pgAdmin certainly knows about them, but I don't believe it'll break if they go. It only knows that attnum 0 must be a system column; no specific knowledge or interpretation

Re: [HACKERS] Get rid of system attributes in pg_attribute?

2005-02-19 Thread Tom Lane
Andreas Pflug [EMAIL PROTECTED] writes: Does anyone know of client code that actually pays attention to pg_attribute rows with negative attnums? Would those columns remain selectable for debugging/maintenance purposes, despite not appearing in system catalogs? Certainly. They just wouldn't

Re: [HACKERS] Get rid of system attributes in pg_attribute?

2005-02-19 Thread Robert Treat
On Saturday 19 February 2005 12:17, Tom Lane wrote: Andreas Pflug [EMAIL PROTECTED] writes: Does anyone know of client code that actually pays attention to pg_attribute rows with negative attnums? Would those columns remain selectable for debugging/maintenance purposes, despite not

Re: [HACKERS] Get rid of system attributes in pg_attribute?

2005-02-19 Thread Tom Lane
Robert Treat [EMAIL PROTECTED] writes: If I am understanding this correctly, they could only be displayed if selected explicitly right? That's always been true. The behavior at the level of SQL commands wouldn't change. The question is whether any apps out there examine pg_attribute and

[HACKERS] Get rid of system attributes in pg_attribute?

2005-02-18 Thread Tom Lane
I'm wondering how useful it is to store explicit representations of the system attributes in pg_attribute. We could very easily hard-wire those things instead, which would make for a large reduction in the number of entries in pg_attribute. (In the current regression database nearly half of the

Re: [HACKERS] Get rid of system attributes in pg_attribute?

2005-02-18 Thread Dave Page
-Original Message- From: [EMAIL PROTECTED] on behalf of Tom Lane Sent: Fri 2/18/2005 8:48 PM To: pgsql-hackers@postgresql.org Subject: [HACKERS] Get rid of system attributes in pg_attribute? Does anyone know of client code that actually pays attention to pg_attribute rows