Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id F0E0F47587E for ; Wed, 10 Jul 2002 10:09:14 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g6AE9HAl016888; Wed, 10 Jul 2002 10:09:17 -0400 (EDT) To: Richard Huxton Cc: pgsql Subject: Re: Error with DISTINCT and AS keywords In-reply-to: <200207101431.14115.dev@archonet.com> References: <200207101431.14115.dev@archonet.com> Comments: In-reply-to Richard Huxton message dated "Wed, 10 Jul 2002 14:31:14 +0100" Date: Wed, 10 Jul 2002 10:09:17 -0400 Message-ID: <16887.1026310157@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200207/139 X-Sequence-Number: 8518 Richard Huxton 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