Re: inconsistency in aliasing

Поиск
Список
Период
Сортировка
От Daniel Verite
Тема Re: inconsistency in aliasing
Дата
Msg-id c95dacb0-d958-4c7c-90f4-e387314c46da@mm
обсуждение исходный текст
Ответ на Re: inconsistency in aliasing  (Lennin Caro <lennin.caro@yahoo.com>)
Ответы Re: inconsistency in aliasing
Список pgsql-general
    Lennin Caro wrote:

> select score,score+1 as score2 from (
> select current_timestamp::abstime::int4 as score)
> order by score2

That additional score2 is not needed in the select output.

This works just fine:

=> select score from (select current_timestamp::abstime::int4 as score)
subsel order by score+1;

The point is that the subselect makes "score" available as a valid
expression to the upper select.

 Best regards,
--
 Daniel
 PostgreSQL-powered mail user agent and storage:
http://www.manitou-mail.org

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

Предыдущее
От: Louis-David Mitterrand
Дата:
Сообщение: Re: inconsistency in aliasing
Следующее
От: Emanuel Calvo Franco
Дата:
Сообщение: Re: inconsistency in aliasing