pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Stanaway <david@netventures.com.au>
To: chester c young <chestercyoung@yahoo.com>
To: pgsql-sql@postgresql.org
Subject: Re: Passing a list of pairs to a PL/PGSQL function
Date: Tue, 22 Jan 2002 13:56:04 +1100
Message-ID: <9329D516-0EE3-11D6-A792-0003930FDAB2@netventures.com.au> (raw)
In-Reply-To: <20020122014715.75985.qmail@web12704.mail.yahoo.com>


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




view thread (4+ messages)  latest in thread

Message-ID: <9329D516-0EE3-11D6-A792-0003930FDAB2@netventures.com.au>
Permalink:  ../9329D516-0EE3-11D6-A792-0003930FDAB2@netventures.com.au/
Also on:    postgresql.org/message-id/9329D516-0EE3-11D6-A792-0003930FDAB2@netventures.com.au

 · 

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: david@netventures.com.au, chestercyoung@yahoo.com
  Subject: Re: Passing a list of pairs to a PL/PGSQL function
  In-Reply-To: <9329D516-0EE3-11D6-A792-0003930FDAB2@netventures.com.au>

* 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