column aliases

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема column aliases
Дата
Msg-id 200001230940.EAA15266@candle.pha.pa.us
обсуждение исходный текст
Ответы Re: [HACKERS] column aliases  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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/aC       | f       | f            |             0 | /bin/ccsql      | 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/aC
|f       | f            |             0 | /bin/cc     | C        | f       | f            |             0 | /bin/ccsql
   | f       | f            |             0 | postgres    | sql      | f       | f            |             0 |
postgres
(3 rows)

--  Bruce Momjian                        |  http://www.op.net/~candle pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Constantin Teodorescu
Дата:
Сообщение: Unique constraint for inherited tables?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Unique constraint for inherited tables?