pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rajesh Kumar Mallah. <mallah@trade-india.com>
To: pgsql-sql@postgresql.org
Subject: Appending to an array[] feild...[ ltree ]
Date: Sat, 21 Sep 2002 10:15:09 +0530
Message-ID: <200209211015.09195.mallah@trade-india.com> (raw)


Hi ,

We are undergoing a data consolidation process wherein we are making a common
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 encounter
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 other words 
i need to insert to the ltree[] feild.  Does there  exists any generic function
(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[] feild
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 the same
ie,{1.1.1,1.1.2,1.1.3,1.1.4} becoz 1.1.1 is already present in the [] , does there
exists any function to probe an ltree[] feild for existance ?



Regards
Mallah.





-- 
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.





Message-ID: <200209211015.09195.mallah@trade-india.com>
Permalink:  ../200209211015.09195.mallah@trade-india.com/
Also on:    postgresql.org/message-id/200209211015.09195.mallah@trade-india.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mallah@trade-india.com
  Subject: Re: Appending to an array[] feild...[ ltree ]
  In-Reply-To: <200209211015.09195.mallah@trade-india.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox