From: | Don Baccus <dhogaza(at)pacifier(dot)com> |
---|---|
To: | "Ross J(dot) Reedstrom" <reedstrm(at)wallace(dot)ece(dot)rice(dot)edu> |
Cc: | PostgreSQL Development <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Re: Happy column adding and dropping |
Date: | 2000-01-25 21:57:15 |
Message-ID: | 3.0.1.32.20000125135715.00f97720@mail.pacifier.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)pacifier(dot)com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2000-01-25 22:35:32 | Re: [HACKERS] Re: [SQL] DISTINCT ON: speak now or forever hold your peace |
Previous Message | Ross J. Reedstrom | 2000-01-25 21:48:39 | Re: Happy column adding and dropping |