pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: sean.johnston@edgeintelligence.com
To: pgsql-bugs@postgresql.org
Subject: BUG #14614: Combination of UNION, EXCEPT and ORDER BY produces an error
Date: Fri, 07 Apr 2017 11:58:08 +0000
Message-ID: <20170407115808.25934.51866@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

The following bug has been logged on the website:

Bug reference:      14614
Logged by:          Sean Johnston
Email address:      sean.johnston@edgeintelligence.com
PostgreSQL version: 9.6.2
Operating system:   Debian 7.11
Description:        

STATEMENT:  ( ( select 1,2,3 ) union ( select 4,5,6 order by 1,2 ) order by
1,2 ) except ( select 4,5,6 ) order by 1,2;
ERROR:  no relation entry for relid 0

Removing the middle order by works:

STATEMENT:  ( ( select 1,2,3 ) union ( select 4,5,6 order by 1,2 ) ) except
( select 4,5,6 ) order by 1,2;
 ?column? | ?column? | ?column? 
----------+----------+----------
        1 |        2 |        3
(1 row)



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


view thread (2+ messages)  latest in thread

Message-ID: <20170407115808.25934.51866@wrigleys.postgresql.org>
Permalink:  ../20170407115808.25934.51866@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20170407115808.25934.51866@wrigleys.postgresql.org

 · 

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-bugs@postgresql.org
  Cc: sean.johnston@edgeintelligence.com
  Subject: Re: BUG #14614: Combination of UNION, EXCEPT and ORDER BY produces an error
  In-Reply-To: <20170407115808.25934.51866@wrigleys.postgresql.org>

* 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