'AS' column-alias beign ignored on outer select

Поиск
Список
Период
Сортировка
От Markus Wollny
Тема 'AS' column-alias beign ignored on outer select
Дата
Msg-id 28011CD60FB1724DBA4442E38277F6264A655F@hermes.computec.de
обсуждение исходный текст
Ответы Re: 'AS' column-alias beign ignored on outer select  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: 'AS' column-alias beign ignored on outer select  ("Thomas F. O'Connell" <tfo@sitening.com>)
Список pgsql-general
Hi!

Is this the expected behaviour?

 select ID
  , USK_RATING AS USK
  from (
   select ID
    , USK_RATING
   from MAIN_SONY_PS2_GAME
   where ID = 101400
   limit 1
   )
   as PRODUCT_LIST
 limit 1;

   id   | usk_rating
--------+------------
 101400 |
(1 row)

Note the column-header being labeled 'usk_rating', not 'usk'. Obviously
the 'AS' column alias of the outer select is being ignored in the
resultset.

 select ID
  , USK
  from (
   select ID
    , USK_RATING AS USK
   from MAIN_SONY_PS2_GAME
   where ID = 101400
   limit 1
   )
   as PRODUCT_LIST
 limit 1;

   id   | usk
--------+-----
 101400 |
(1 row)

If the column alias is being declared in the subselect, the column alias
is working.

 select version();
                               version
----------------------------------------------------------------------
 PostgreSQL 8.1.0 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2

Is this working as expected or is this a bug?

Kind regards

   Markus

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

Предыдущее
От: Volkan YAZICI
Дата:
Сообщение: Re: encoding problem
Следующее
От: Jerry Sievers
Дата:
Сообщение: Re: PostgresSQL Halting System Boot