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

Re: WITH RECUSIVE patches 0723

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: WITH RECUSIVE patches 0723
Date: 2008-07-28 23:04:14
Message-ID: 203.1217286254@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> 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.

Really?  I tried googling to see what other people thought that the
WITH clause was for, and the first relevant hit I got was this one:
http://www.oracle-developer.net/display.php?id=212
which certainly treats it as a key part of the feature.

My thought is that we could optimize away materialization in cases where
we can tell it's not needed (no volatile functions and/or no multiple
scans of the subquery).  But not being able to do it means we've
implemented the feature incorrectly.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2008-07-28 23:09:08
Subject: Re: WITH RECUSIVE patches 0723
Previous:From: Gregory StarkDate: 2008-07-28 22:54:28
Subject: Re: [RFC] Unsigned integer support.

pgsql-patches by date

Next:From: Andrew DunstanDate: 2008-07-28 23:09:08
Subject: Re: WITH RECUSIVE patches 0723
Previous:From: Martijn van OosterhoutDate: 2008-07-28 22:24:46
Subject: Re: WITH RECUSIVE patches 0723

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