Re: inconsistency in aliasing
От | A. Kretschmer |
---|---|
Тема | Re: inconsistency in aliasing |
Дата | |
Msg-id | 20090114110647.GC30398@a-kretschmer.de обсуждение исходный текст |
Ответ на | inconsistency in aliasing (Louis-David Mitterrand <vindex+lists-pgsql-general@apartia.org>) |
Ответы |
Re: inconsistency in aliasing
|
Список | pgsql-general |
In response to Louis-David Mitterrand : > Hi, > > This works: > > critik=# select current_timestamp::abstime::int4 as score order by score; > > This doesn't: > > critik=# select current_timestamp::abstime::int4 as score order by score + 1; > ERROR: column "score" does not exist > LINE 1: ...urrent_timestamp::abstime::int4 as score order by score + 1 ... > > Any idea ? Yes, you can't use the alias in the ORDER BY. Use the real column-name. select current_timestamp::abstime::int4 as score order by current_timestamp::abstime::int4; Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header) GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
В списке pgsql-general по дате отправления: