From: Markus Bertheau <twanger@bluetwanger.de>
To: pgsql-sql@postgresql.org
Subject: optimizer, view, union
Date: Thu, 23 Jun 2005 19:31:57 +0200
Message-ID: <1119547917.7430.12.camel@localhost.localdomain> (raw)
Hi,
Can pg transform
SELECT * FROM (
SELECT 'foo' AS class, id FROM foo
UNION ALL
SELECT '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>
Attachments:
signature.asc (application/pgp-signature, 188B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: twanger@bluetwanger.de
Subject: Re: optimizer, view, union
In-Reply-To: <1119547917.7430.12.camel@localhost.localdomain>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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