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

Re: What's new?

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Peter Geoghegan <peter(dot)geoghegan86(at)gmail(dot)com>
Cc: iepug(at)postgresql(dot)org
Subject: Re: What's new?
Date: 2010-01-30 13:32:29
Message-ID: (view raw, whole thread or download thread mbox)
Lists: iepug
On 30/01/2010 00:31, Peter Geoghegan wrote:

>> I had a play with the query Greg Stark produced that generates the
>> Mandelbrot set - really cool! Haven't needed to look at window functions
>> yet, but keeping them in the back of my mind as a tool.
> Wasn't that David Fetter? You might be surprised at the broad

Yes, I think you're right, it was - I copied it from a set of slides
from a talk that Greg gave on recursive queries.

> applicability of CTEs (recursive CTEs not so much) - I was. They've
> sprung up a lot in my production code. I was able to use a recursive
> CTE very effectively to populate a graph of historic stock quantities
> day-by-day, working backwards from the authoritative current qty in
> stock - doing this without recursive CTEs would have been very
> difficult. They make complex queries more manageable too.

Cool! Most of the queries I've been writing in the current project are
very simple - simple inserts and updates, no complex joins. However, I'm
planning on revisiting an online aircraft booking system I wrote for the
Flying Club a while back, which uses some reasonably complex queries to
build time-sheets and other stuff... I had to use a plpgsql function in
the end, but I'd be interested to see if I can use CTEs to simplify it
and maybe improve performance. I can post the code if you're interested.


Raymond O'Donnell :: Galway :: Ireland

In response to


iepug by date

Next:From: Peter GeogheganDate: 2010-01-30 14:03:26
Subject: Re: What's new?
Previous:From: Peter GeogheganDate: 2010-01-30 13:17:05
Subject: Re: What's new?

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