optimizer, view, union - Mailing list pgsql-sql

From Markus Bertheau
Subject optimizer, view, union
Date
Msg-id 1119547917.7430.12.camel@localhost.localdomain
Whole thread Raw
Responses Re: optimizer, view, union
List pgsql-sql
Hi,

Can pg transform

SELECT * FROM (SELECT 'foo' AS class, id FROM fooUNION ALLSELECT 'bar' AS class, id FROM bar
) AS a WHERE class = 'foo'

into

SELECT 'foo' AS class, * FROM foo?

The subselect is a view here, that's why I don't just use the second
query.

Markus

--
Markus Bertheau <twanger@bluetwanger.de>

pgsql-sql by date:

Previous
From: "Russell Simpkins"
Date:
Subject: Re: after delete trigger behavior
Next
From: "Thomas F. O'Connell"
Date:
Subject: Grouping Too Closely