Re: Using WITH queries on VIEWs

From: David Fetter <david(at)fetter(dot)org>
To: Jorge Godoy <jgodoy(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Using WITH queries on VIEWs
Date: 2009-08-30 22:46:46
Message-ID: 20090830224646.GI20482@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Aug 30, 2009 at 07:33:52PM -0300, Jorge Godoy wrote:
> Hi!
>
>
> Is it possible to use WITH queries (
> http://www.postgresql.org/docs/8.4/interactive/queries-with.html) on VIEWs?
>
> I have a rather complex view that I could optimize with it...

A WITH query can go anywhere any other read-only (for now)
row-returning query can, so top-level SELECTs, sub-selects, etc.

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Marcus Engene 2009-08-30 22:54:35 short circuit joins
Previous Message David Fetter 2009-08-30 22:44:54 Re: $Body$