Re: Happy column adding and dropping

Поиск
Список
Период
Сортировка
От Don Baccus
Тема Re: Happy column adding and dropping
Дата
Msg-id 3.0.1.32.20000125135715.00f97720@mail.pacifier.com
обсуждение исходный текст
Ответ на Re: Happy column adding and dropping  ("Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu>)
Список 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 по дате отправления:

Предыдущее
От: "Ross J. Reedstrom"
Дата:
Сообщение: Re: Happy column adding and dropping
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Happy column adding (was RE: [HACKERS] Happy column dropping)