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

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(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:32:11
Message-ID: 200701112032.l0BKWBU00745@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> 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.

Where are the style guidelines? I looked before but can't find them.

I agree the second part could be a hint.

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2007-01-11 20:32:14 Re: generate_series with month intervals
Previous Message Adrian Klaver 2007-01-11 20:26:30 Re: TRIGGER BEFORE INSERT