Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 034D0476291 for ; Sat, 21 Sep 2002 00:41:50 -0400 (EDT) Received: from mail-relay.trade-india.com (mail-relay.trade-india.com [203.196.129.235]) by postgresql.org (Postfix) with SMTP id C26F047629F for ; Sat, 21 Sep 2002 00:41:45 -0400 (EDT) Received: (qmail 5269 invoked from network); 21 Sep 2002 04:32:57 -0000 Received: from system67.trade-india-local.com (192.168.0.67) by infocom-236-129-del.trade-india.com with SMTP; 21 Sep 2002 04:32:57 -0000 Content-Type: text/plain; charset="us-ascii" From: "Rajesh Kumar Mallah." Organization: Infocom Network Limited. To: pgsql-sql@postgresql.org Subject: Appending to an array[] feild...[ ltree ] Date: Sat, 21 Sep 2002 10:15:09 +0530 User-Agent: KMail/1.4.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200209211015.09195.mallah@trade-india.com> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/256 X-Sequence-Number: 9533 Hi , We are undergoing a data consolidation process wherein we are making a comm= on repository of business profiles from various sources. I require to store label paths like 1.1.1 , 1.1.2,1.1.3 etc in a feild and i use ltree[] for fast searching. The problem is in the ltree[] feild in need to store uniq paths and need want to know if some utility functions exists. For example if {1.1.1,1.1.2,1.1.3} is contained in a ltree[] record and i e= ncounter a path say 1.1.4 i need to update it to {1.1.1,1.1.2,1.1.3,1.1.4} in othe= r words=20 i need to insert to the ltree[] feild. Does there exists any generic func= tion (or ltree[] specific function) to add an item in the array? (first question) My another question is is there any way to matain uniqueness in a ltree[] f= eild for example , suppose i now encounter {1.1.1} again i do not want to update the record to {1.1.1,1.1.2,1.1.3,1.1.4,1.1.1} to want it to remain t= he same ie,{1.1.1,1.1.2,1.1.3,1.1.4} becoz 1.1.1 is already present in the [] , doe= s there exists any function to probe an ltree[] feild for existance ? Regards Mallah. --=20 Rajesh Kumar Mallah, Project Manager (Development) Infocom Network Limited, New Delhi phone: +91(11)6152172 (221) (L) ,9811255597 (M) Visit http://www.trade-india.com , India's Leading B2B eMarketplace.