Re: Happy column adding and dropping - Mailing list pgsql-hackers

From Don Baccus
Subject Re: Happy column adding and dropping
Date
Msg-id 3.0.1.32.20000125135715.00f97720@mail.pacifier.com
Whole thread Raw
In response to Re: Happy column adding and dropping  ("Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu>)
List pgsql-hackers
At 03:48 PM 1/25/00 -0600, Ross J. Reedstrom wrote:

>       http://wallace.ece.rice.edu/sql1992.txt.gz 

Thanks!  Now I have my own copy...
...

>> Does the standard give a way to access the ordinal position of 
>> columns?
>
>You mean go from <column name> to <ordinal>? I don't think so, but I
>haven't grovelled through the standard enough... O.K., now I have. It's
>in the defined system tables, in particular the COLUMNS table, which I
>won't duplicate here, since it runs to more than a printed page! It's
>in clause 21.3.10, page 580, and defines a table that includes fields
>
>[...]
>              TABLE_NAME         INFORMATION_SCHEMA.SQL_IDENTIFIER,
>              COLUMN_NAME        INFORMATION_SCHEMA.SQL_IDENTIFIER,
>              ORDINAL_POSITION   INFORMATION_SCHEMA.CARDINAL_NUMBER
>                CONSTRAINT COLUMN_POSITION_NOT_NULL NOT NULL,
>[...]
>
>So, yes, there is a standard way to get from <table name> + <ordinal> to
><column name>, if that's what you meant (since getting at the _contents_
>is trivial: SELECT <ordinal> from <table name> Gack, look what you've
>done, I'm starting to type in <standard complient markup> ;-)

OK, I asked because someone earlier said that Postgres should probably
eventually provide SQL92 standard ways to get at table information.

Interesting...




- Don Baccus, Portland OR <dhogaza@pacifier.com> Nature photos, on-line guides, Pacific Northwest Rare Bird Alert
Serviceand other goodies at http://donb.photo.net.
 


pgsql-hackers by date:

Previous
From: "Ross J. Reedstrom"
Date:
Subject: Re: Happy column adding and dropping
Next
From: Bruce Momjian
Date:
Subject: Re: Happy column adding (was RE: [HACKERS] Happy column dropping)