Re: [HACKERS] UNION not allowed in sub-selects? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] UNION not allowed in sub-selects?
Date
Msg-id 9039.943829037@sss.pgh.pa.us
Whole thread Raw
In response to UNION not allowed in sub-selects?  ("Oliver Elphick" <olly@lfix.co.uk>)
List pgsql-hackers
"Oliver Elphick" <olly@lfix.co.uk> writes:
> In 6.5.3, it seems that UNION is not allowed inside a sub-select:
> Is this a permanent feature, an oversight, or something already on the TODO
> list?

The latter, as a moment's investigation would have shown you:

* Support UNION/INTERSECT/EXCEPT in sub-selects

Changing the grammar to allow it would be the work of a moment,
but the rewriter and other stages need more work.  I've been putting
it off until we do the much-discussed, little-implemented querytree
representation redesign.  It might be possible to fix this within the
current representation, but Except_Intersect_Rewrite() is so
ugly/grotty/broken that I don't really want to touch it until I can
discard it and rewrite from the ground up...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tim Holloway
Date:
Subject: Re: [HACKERS] Re: pg_ctl
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] How to get OID from INSERT in PL/PGSQL?