Re: Passing a list of pairs to a PL/PGSQL function - Mailing list pgsql-sql

From David Stanaway
Subject Re: Passing a list of pairs to a PL/PGSQL function
Date
Msg-id 9329D516-0EE3-11D6-A792-0003930FDAB2@netventures.com.au
Whole thread Raw
In response to Passing a list of pairs to a PL/PGSQL function  (David Stanaway <david@netventures.com.au>)
List pgsql-sql
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



pgsql-sql by date:

Previous
From: David Stanaway
Date:
Subject: Passing a list of pairs to a PL/PGSQL function
Next
From: "Unnikrishnan Menon"
Date:
Subject: Re: Date Time calculation help