Re: ORDER BY col is NULL in UNION causes error? - Mailing list pgsql-general

From Bruce Momjian
Subject Re: ORDER BY col is NULL in UNION causes error?
Date
Msg-id 200701111920.l0BJKP106601@momjian.us
Whole thread Raw
In response to Re: ORDER BY col is NULL in UNION causes error?  (Mike Benoit <ipso@snappymail.ca>)
Responses Re: ORDER BY col is NULL in UNION causes error?
List pgsql-general
Mike Benoit wrote:
> That helps some, but I'm sure it could be even more clear.
>
> The main issue is that you can't order by an expression computed by
> unions, correct? So couldn't the error message by something like:
>
> "ORDER BY on a UNION/INTERSECT/EXCEPT result must match existing result
> columns and not be an expression")));

Well, it can be an expression _if_ the expression _matches_ an existing
UNION column.

--
  Bruce Momjian   bruce@momjian.us
  EnterpriseDB    http://www.enterprisedb.com

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

pgsql-general by date:

Previous
From: "Merlin Moncure"
Date:
Subject: pg_standby testing notes
Next
From: Bruce Momjian
Date:
Subject: Re: Trying to load MySQL data