pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #14614: Combination of UNION, EXCEPT and ORDER BY produces an error
2+ messages / 2 participants
[nested] [flat]

* BUG #14614: Combination of UNION, EXCEPT and ORDER BY produces an error
@ 2017-04-07 11:58 sean.johnston@edgeintelligence.com
  2017-04-07 16:19 ` Re: BUG #14614: Combination of UNION, EXCEPT and ORDER BY produces an error Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: sean.johnston@edgeintelligence.com @ 2017-04-07 11:58 UTC (permalink / raw)
  To: pgsql-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


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #14614: Combination of UNION, EXCEPT and ORDER BY produces an error
  2017-04-07 11:58 BUG #14614: Combination of UNION, EXCEPT and ORDER BY produces an error sean.johnston@edgeintelligence.com
@ 2017-04-07 16:19 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2017-04-07 16:19 UTC (permalink / raw)
  To: sean.johnston@edgeintelligence.com; +Cc: pgsql-bugs

sean.johnston@edgeintelligence.com writes:
> 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

I've pushed a fix for this.  Thanks for the report!

			regards, tom lane


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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2017-04-07 16:19 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-04-07 11:58 BUG #14614: Combination of UNION, EXCEPT and ORDER BY produces an error sean.johnston@edgeintelligence.com
2017-04-07 16:19 ` Tom Lane <tgl@sss.pgh.pa.us>

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