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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-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

Browse pgsql-hackers by date

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

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2008-07-28 23:04:14 Re: WITH RECUSIVE patches 0723
Previous Message Andrew Gierth 2008-07-28 21:39:13 Re: WITH RECUSIVE patches 0723