Re: ORDER BY col is NULL in UNION causes error?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Mike Benoit <ipso(at)snappymail(dot)ca>, Michael Glaesemann <grzm(at)seespotcode(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: ORDER BY col is NULL in UNION causes error?
Date: 2007-01-11 20:18:43
Message-ID: 214.1168546723@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bruce Momjian <bruce(at)momjian(dot)us> writes:
> Updated wording:

> test=> select * from test union select * from test order by x is null;
> ERROR: A UNION/INTERSECT/EXCEPT ORDER BY cannot use expressions or functions, only result column names

This does not meet the style guidelines.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Magnus Hagander 2007-01-11 20:19:31 Re: [HACKERS] Checkpoint request failed on version 8.2.1.
Previous Message Marcus Engene 2007-01-11 20:18:31 Re: generate_series with month intervals