| From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
|---|---|
| To: | PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org> |
| Subject: | column aliases |
| Date: | 2000-01-23 09:40:17 |
| Message-ID: | 200001230940.EAA15266@candle.pha.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Can someone explain this to me? When I use the alias p, should a
reference to pg_language.oid create a new instance of pg_language in the
range table. Seems it does not. Does the standard say the first query
is legal?
---------------------------------------------------------------------------
test=> select * from pg_language p where p.oid = pg_language.oid;
lanname | lanispl | lanpltrusted | lanplcallfoid | lancompiler
----------+---------+--------------+---------------+-------------
internal | f | f | 0 | n/a
C | f | f | 0 | /bin/cc
sql | f | f | 0 | postgres
(3 rows)
test=> select * from pg_language p, pg_language q where p.oid = q.oid;
lanname | lanispl | lanpltrusted | lanplcallfoid | lancompiler | lanname | lanispl | lanpltrusted | lanplcallfoid | lancompiler
----------+---------+--------------+---------------+-------------+----------+---------+--------------+---------------+-------------
internal | f | f | 0 | n/a | internal | f | f | 0 | n/a
C | f | f | 0 | /bin/cc | C | f | f | 0 | /bin/cc
sql | f | f | 0 | postgres | sql | f | f | 0 | postgres
(3 rows)
--
Bruce Momjian | http://www.op.net/~candle
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2000-01-23 10:04:37 | Re: [HACKERS] Unique constraint for inherited tables? |
| Previous Message | Constantin Teodorescu | 2000-01-23 09:33:51 | Unique constraint for inherited tables? |