Re: running aggregates entirely in SQL?

From: David Fetter <david(at)fetter(dot)org>
To: SF Postgres <sfpug(at)postgresql(dot)org>
Subject: Re: running aggregates entirely in SQL?
Date: 2004-05-11 18:43:36
Message-ID: 20040511184336.GB31365@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: sfpug

On Tue, May 11, 2004 at 11:01:13AM -0700, Brian Ghidinelli wrote:
>
> Joe Celko has some examples in his "SQL for Smarties" book for doing
> running aggregates entirely in SQL. I believe they will work in most
> database servers. I don't have the book handy but it's a place to look.

It's handy :)

BTW, one way I've done it is to create a temporary sequence, then use
it to impose an ordered row structure.

> On the Celko note - has anyone implemented his nested tree model?
> It's really great for arbitrarily deeply nested hierarchies.

See contrib/ltree.

Cheers,
D
--
David Fetter david(at)fetter(dot)org http://fetter.org/
phone: +1 510 893 6100 mobile: +1 415 235 3778

Remember to vote!

In response to

Responses

Browse sfpug by date

  From Date Subject
Next Message Josh Berkus 2004-05-11 19:31:10 Re: running aggregates entirely in SQL?
Previous Message Brian Ghidinelli 2004-05-11 18:01:13 Re: running aggregates entirely in SQL?