| From: | "Daniel Verite" <daniel(at)manitou-mail(dot)org> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: inconsistency in aliasing |
| Date: | 2009-01-14 14:21:02 |
| Message-ID: | c95dacb0-d958-4c7c-90f4-e387314c46da@mm |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general pgsql-hackers |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Emanuel Calvo Franco | 2009-01-14 14:46:00 | Re: inconsistency in aliasing |
| Previous Message | Louis-David Mitterrand | 2009-01-14 14:01:35 | Re: inconsistency in aliasing |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2009-01-14 14:35:42 | Re: Documenting pglesslog |
| Previous Message | Andrew Chernow | 2009-01-14 14:13:54 | Re: solaris libpq threaded build fails |