X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7F9C05354D for ; Sat, 16 Apr 2005 09:31:42 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 77295-05 for ; Sat, 16 Apr 2005 12:31:40 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.196]) by svr1.postgresql.org (Postfix) with ESMTP id 4F781534C8 for ; Sat, 16 Apr 2005 09:31:39 -0300 (ADT) Received: by rproxy.gmail.com with SMTP id j1so740652rnf for ; Sat, 16 Apr 2005 05:31:43 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=LrnHoZLxVWEJfy7BuIqXeH7CwW63eijtiQUZ81ZRj/RQIrZvpHfElkZUYpdG7Rlb5yKA3YfQO8LOMqPlSI17NTU17LCi1DlTfnihW6w60DZUHVcJ/aV+wKu0l7fF5kGV65CR3fsOS3onhliftozQccDkAEUW+tBO03fMkO97j6Y= Received: by 10.38.92.65 with SMTP id p65mr673634rnb; Sat, 16 Apr 2005 05:31:43 -0700 (PDT) Received: by 10.38.209.59 with HTTP; Sat, 16 Apr 2005 05:31:43 -0700 (PDT) Message-ID: Date: Sat, 16 Apr 2005 16:31:43 +0400 From: "A. Kulikov" Reply-To: "A. Kulikov" To: pgsql-sql@postgresql.org Subject: Nested Sets Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.398 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200504/231 X-Sequence-Number: 21124 Hi all, I have just moved to PostgreSQL from MySQL and am willing to employ all the capabilities PostgreSQL has to offer. In MySQL I have had implemented Joe Celko's Nested Sets quite a while ago, extending them with some additional fields to cache data such as the level of the node and a reference to the parent node for better data manipulation. I don't feel like reinventing the wheel again in PostgreSQL by simply porting all the SQL from MySQL and not giving priority to stuff like stored procedures and referential integrity in postgres. A search over google and these mailing lists have yielded little results, perharps I am missing something. Has anyone implemented a pretty Nested Sets solution in PostgreSQL? Or is this considered black voodoo and noone wants to show their solutions to the world? with regards, A. Kulikov --=20 The mind is essential -- http://essentialmind.com/