Re: Passing a list of pairs to a PL/PGSQL function

From: David Stanaway <david(at)netventures(dot)com(dot)au>
To: chester c young <chestercyoung(at)yahoo(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Passing a list of pairs to a PL/PGSQL function
Date: 2002-01-22 02:56:04
Message-ID: 9329D516-0EE3-11D6-A792-0003930FDAB2@netventures.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)stanaway(dot)net
Work: david(at)netventures(dot)com(dot)au

Browse pgsql-sql by date

  From Date Subject
Next Message Unnikrishnan Menon 2002-01-22 03:29:35 Re: Date Time calculation help
Previous Message David Stanaway 2002-01-22 00:39:16 Passing a list of pairs to a PL/PGSQL function