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

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to