Re: WITH RECUSIVE patches 0723 - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: WITH RECUSIVE patches 0723
Date
Msg-id 20080728222446.GC24856@svana.org
Whole thread Raw
In response to Re: WITH RECUSIVE patches 0723  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Responses Re: WITH RECUSIVE patches 0723  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: WITH RECUSIVE patches 0723  ("Pavel Stehule" <pavel.stehule@gmail.com>)
List pgsql-hackers
On Mon, Jul 28, 2008 at 07:57:16PM +0100, Andrew Gierth wrote:
> Which will be a serious pessimization in many common cases if you do
> it all the time. Googling for examples of non-recursive WITH queries
> shows that it is very widely used for clarity or convenience, in
> contexts where you _don't_ want materialization.

Since the problem is using the result of a WITH clause more than once,
would it be sufficient to simply detect that case and bail? You don't
want materialisation is most cases, there's just a few where it is
needed.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

pgsql-hackers by date:

Previous
From: "Dawid Kuroczko"
Date:
Subject: Re: Do we really want to migrate plproxy and citext into PG core distribution?
Next
From: Tom Lane
Date:
Subject: Re: Do we really want to migrate plproxy and citext into PG core distribution?