Joe, That's cool! Thanks for the tip. It looks like your "branch" is my "ancestry". I'll look in contrib more often. I could use connectby() instead of my homebrew plpgsql functions.
Shawn ----- Original Message ----- From: "Joe Conway" <[EMAIL PROTECTED]> To: "Shawn Harrison" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, March 24, 2004 11:37 PM Subject: Re: [GENERAL] self referencing tables/ nested sets etc... > Shawn Harrison wrote: > > Forbes. But my own approach is to let the unique id of each object serve as > > its "key" in the nested set key-chain (which I call its "ancestry"), and > > separate the ids with path separator, e.g.: > > See connectby() in contrib/tablefunc. It produces much the same output > dynamically. > > Joe ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend