pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: pgsql <pgsql-sql@postgresql.org>
Subject: Re: Error with DISTINCT and AS keywords
Date: Wed, 10 Jul 2002 14:31:14 +0100
Message-ID: <200207101431.14115.dev@archonet.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0207101525330.23339-100000@matrix.gatewaynet.com>
References: <Pine.LNX.4.44.0207101525330.23339-100000@matrix.gatewaynet.com>

On Wednesday 10 Jul 2002 1:25 pm, Achilleus Mantzios wrote:
> On Wed, 10 Jul 2002, Andreas Schlegel wrote:

> > select DISTINCT tnr, titel, 'TEST' AS testcol from tTitel;
> > ERROR:  Unable to identify an ordering operator '<' for type 'unknown'
> >          Use an explicit ordering operator or modify the query
>
> Do it as
>
> select DISTINCT tnr, titel, 'TEST'::text AS testcol from tTitel;

Does anyone know what type a quoted literal has? The error message reports 
"unknown" - is that because it may be a date? It does strike me as a little 
unexpected that a quoted string doesn't default to text.

- Richard Huxton



view thread (5+ messages)  latest in thread

Message-ID: <200207101431.14115.dev@archonet.com>
Permalink:  ../200207101431.14115.dev@archonet.com/
Also on:    postgresql.org/message-id/200207101431.14115.dev@archonet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: dev@archonet.com
  Subject: Re: Error with DISTINCT and AS keywords
  In-Reply-To: <200207101431.14115.dev@archonet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox