Skip site navigation (1) Skip section navigation (2)

Re: WITH RECUSIVE patches 0723

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: WITH RECUSIVE patches 0723
Date: 2008-07-28 22:24:46
Message-ID: 20080728222446.GC24856@svana.org (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
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(at)svana(dot)org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while 
> boarding. Thank you for flying nlogn airlines.

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2008-07-28 22:48:24
Subject: Re: Do we really want to migrate plproxy and citext into PG core distribution?
Previous:From: Dawid KuroczkoDate: 2008-07-28 22:16:25
Subject: Re: Do we really want to migrate plproxy and citext into PG core distribution?

pgsql-patches by date

Next:From: Tom LaneDate: 2008-07-28 23:04:14
Subject: Re: WITH RECUSIVE patches 0723
Previous:From: Andrew GierthDate: 2008-07-28 21:39:13
Subject: Re: WITH RECUSIVE patches 0723

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group