On Fri, Jul 11, 2014 at 2:43 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > This example in the regression database is a simplified version of a bug > I was shown off-list: > > regression=# select ( > select q from > ( select 1,2,3 where f1>0 > union all > select 4,5,6.0 where f1<=0 > ) q > ) > from int4_tbl; > ERROR: record type has not been registered
Thanks Tom! If anybody gets hit by this, the workaround I use is to put the inner subquery as a CTE: select ( select q from ( with data as ( select 1,2,3 where f1>0 union all select 4,5,6.0 where f1<=0 ) select * from data ) q ) from int4_tbl; merlin -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers