Received: from dealer.netventures.com.au (dnet137107-1.gw.connect.com.au [210.8.15.221] (may be forged)) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0M2tql13678 for ; Mon, 21 Jan 2002 21:55:53 -0500 (EST) (envelope-from david@netventures.com.au) Received: from ciderbox.in.netventures.com.au (net137107-2.gw.connect.com.au [210.9.198.119]) by dealer.netventures.com.au (Postfix) with ESMTP id CACAF1A5DC1; Tue, 22 Jan 2002 13:55:55 +1100 (EST) Date: Tue, 22 Jan 2002 13:56:04 +1100 Subject: Re: Passing a list of pairs to a PL/PGSQL function Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v480) From: David Stanaway To: chester c young , pgsql-sql@postgresql.org Content-Transfer-Encoding: 7bit In-Reply-To: <20020122014715.75985.qmail@web12704.mail.yahoo.com> Message-Id: <9329D516-0EE3-11D6-A792-0003930FDAB2@netventures.com.au> X-Mailer: Apple Mail (2.480) X-Archive-Number: 200201/251 X-Sequence-Number: 6335 On Tuesday, January 22, 2002, at 12:47 PM, chester c young wrote: > might be missing something here, but why don't you truncate the table, > insert from the list, and you're done. Thats what I do at the moment (But not in a function), however I am burning through the oid's and itemproperty_itempropertyid_seq. Its not really a big deal I know. I just thought that it would be better to update existing records where possible. Asuming I do make a function edititemproperty(int,text[][]) What would be the best structure to pass in pairs of values for the insert? With text[][], I am not sure how to expand that into a set of pairs for an INSERT INTO ... SELECT ...; ============================== David Stanaway Personal: david@stanaway.net Work: david@netventures.com.au