as far as I know, this bit (statement evaluation) wasn't implemented
then. It only got there in 8.4, so you can have even subselects
evaluated.
So it isn't a bug, it just wasn't implemented to work that way back than,
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make c
2009/1/14 Daniel Verite :
>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_
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
On Wed, Jan 14, 2009 at 05:53:57AM -0800, Lennin Caro wrote:
> --- On Wed, 1/14/09, Louis-David Mitterrand
> wrote:
>
> > From: Louis-David Mitterrand
> > Subject: Re: [GENERAL] inconsistency in aliasing
> > To: pgsql-general@postgresql.org
> > Date: Wedn
--- On Wed, 1/14/09, Louis-David Mitterrand
wrote:
> From: Louis-David Mitterrand
> Subject: Re: [GENERAL] inconsistency in aliasing
> To: pgsql-general@postgresql.org
> Date: Wednesday, January 14, 2009, 11:27 AM
> On Wed, Jan 14, 2009 at 12:06:47PM +0100, A. Kretschmer
Reg Me Please wrote:
> 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 ?
>
> Thanks,
Looks and smells like a bug.
Read
h
On Wed, Jan 14, 2009 at 3:46 AM, Louis-David Mitterrand
wrote:
> 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:
In response to Louis-David Mitterrand :
> > 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;
>
> Did you try
>
> "select current_timestamp::abstime::int4 as score order
On Wed, Jan 14, 2009 at 06:31:55PM +0700, dbalinglung wrote:
> what for of the syntax command +1 on order by ? maybe just wrong to
> given result about the error query on order by, it's BUG ?
*PARSE ERROR*
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to
bject: [GENERAL] inconsistency in aliasing
> 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;
>
On Wed, Jan 14, 2009 at 12:06:47PM +0100, A. Kretschmer wrote:
> 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::ab
I don't know, if this is an inconsistence or a bug, but here a possible
workaround:
select current_timestamp::abstime::int4 as score,
current_timestamp::abstime::int4 + 1 as "score + 1" order by "score + 1";
Ludwig
This works:
critik=# select current_timestamp::abstime::int4 as
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
On Wednesday 14 January 2009 11:46:11 Louis-David Mitterrand wrote:
> 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: col
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::i
15 matches
Mail list logo