Re: order by is ambiguous

From: Travel Jadoo <jadoo(at)xs4all(dot)nl>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: order by is ambiguous
Date: 2004-01-08 17:20:51
Message-ID: 1073582450.11264.30.camel@server
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2004-01-08 at 16:09, Tom Lane wrote:
> Travel Jadoo <jadoo(at)xs4all(dot)nl> writes:
> > I could not find any discussion on this but imho this seems an erroneous
> > error occuring now in 7.3.4 (after upgrade from 7.2.3):
>
> > select null::time, 'test'::varchar as time order by time;
> > ERROR: ORDER BY 'time' is ambiguous
>
> What's erroneous about it? You have two output columns named 'time'.
>
> regards, tom lane

Hmm but the first one has actually no name, it's just casted as datatype
time. I now realise that casted columns get assigned the datatype as
name. Should it not show ?column? as output just like you a "select
null;" would do?

This actually came up as I have multiple time fields but only one was
named time by me.

Regards,
Alfred

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message C G 2004-01-08 17:24:01 Simulation output using libpq
Previous Message Tom Lane 2004-01-08 17:16:49 Re: 7.3.3 drop table takes very long time