Re: Error with DISTINCT and AS keywords - Mailing list pgsql-sql

From Tom Lane
Subject Re: Error with DISTINCT and AS keywords
Date
Msg-id 16887.1026310157@sss.pgh.pa.us
Whole thread Raw
In response to Re: Error with DISTINCT and AS keywords  (Richard Huxton <dev@archonet.com>)
List pgsql-sql
Richard Huxton <dev@archonet.com> writes:
> Does anyone know what type a quoted literal has?

It's assigned the placeholder type UNKNOWN until the parser can figure
out from context what type it should be.  Unfortunately in this case
there's no context the parser knows how to work with.

> It does strike me as a little 
> unexpected that a quoted string doesn't default to text.

Yeah, I have a TODO item to let unknown be resolved to text when the
only available context is an ORDER BY (or equivalently DISTINCT)
request.  I've looked at this a little bit but not figured out where
the cleanest place to do it is.
        regards, tom lane


pgsql-sql by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Error with DISTINCT and AS keywords
Next
From: Jean-Luc Lachance
Date:
Subject: Re: Error with DISTINCT and AS keywords