Re: programming in pgsql

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: Angshu Kar <angshu96(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: programming in pgsql
Date: 2006-01-10 20:31:44
Message-ID: 20060110203144.GE3902@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jan 09, 2006 at 10:13:12AM +0000, Richard Huxton wrote:
> Angshu Kar wrote:
> >Hi Pgsql,
> >
> >Could anyone please advise whether the following program can be implemented
> >using pgsql cursors/anythign else (or do we need some external scripts)?If
> >yes, could you give please some function names etc?
> [snip series of queries]
>
> Any procedural language will be able to handle this.
> The only problem you'll have will be that the whole function will take
> place inside a single transaction, so you won't be able to spread the
> workload out over time.

There are also other ways to do this. Celko presents one in "SQL For
Smarties" based on setting up a graph (google:sql for smarties graph),
and there is also contrib/ltree. Either of these is likely to perform
much better than a heirarchy, unless you're doing a lot of
inserts/updates/deletes (graphs) or need a lot of levels (ltree).
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jim C. Nasby 2006-01-10 20:34:19 Re: PostgreSQL Arrays and Performance
Previous Message Jim C. Nasby 2006-01-10 20:19:14 Re: E-mail harvesting on PG lists?