Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> But having said that, it seems that this complaint implies that
> CREATE MATERIALIZED VIEW ... WITH NO DATA still runs the query
> through a planning cycle. Why is that? I can't immediately see
> any benefit to doing so.
Well, to be honest, it's because CREATE TABLE AS ... WITH NO DATA
does so, and I figured that if it was needed there I didn't see why
CREATE MATERIALIZED VIEW AS ... WITH NO DATA would be any
different. I'm shameless in copying what seems to be working.
--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company