=?iso-8859-1?Q?Fran=E7ois_Beausoleil?= <francois@xxxxxxxxxxx> writes: > I have a view similar to this (regression at end): > CREATE VIEW published_reports AS > SELECT true AS aired, * > FROM published_aired_reports > UNION ALL > SELECT false AS aired, * > FROM published_unaired_reports; > Given that view definition, I expected a WHERE clause with the hard-coded value to ignore one of the tables: > SELECT COUNT(*) FROM published_reports WHERE aired; > This is on 9.1.3, but may have changed later. Works for me. After a quick glance at the release notes, I think this was fixed in 9.1.4: * Fix planning of UNION ALL subqueries with output columns that are not simple variables (Tom Lane) Planning of such cases got noticeably worse in 9.1 as a result of a misguided fix for "MergeAppend child's targetlist doesn't match MergeAppend" errors. Revert that fix and do it another way. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general