Re: what is the PostgreSQL idiom for "insert or update"? - Mailing list pgsql-novice

From Robert Poor
Subject Re: what is the PostgreSQL idiom for "insert or update"?
Date
Msg-id AANLkTinVT=K7zLrqyDGtHFBkapVbq-odeeywenucGNT1@mail.gmail.com
Whole thread Raw
In response to Re: what is the PostgreSQL idiom for "insert or update"?  (Kenneth Marshall <ktm@rice.edu>)
List pgsql-novice
Ken:

On Wed, Mar 16, 2011 at 07:48, Kenneth Marshall <ktm@rice.edu> wrote:
> On Wed, Mar 16, 2011 at 07:32:13AM -0700, Robert Poor wrote:
>> ...I would like to do efficient "bulk loading" of tables
>> using multi-row INSERT commands, ignoring unique records that are
>> already present, where 'uniqueness' is defined by key constraints.
>
> Here is the current documented method:
>
> http://www.postgresql.org/docs/9.0/static/plpgsql-control-structures.html

The construct at the bottom of the page looks promising.  I'm loading
about 500 records in a single transaction; I'm not clear on how to
recast the merge_db() method to handle multiple records.  Can you
elucidate?  Thanks...

pgsql-novice by date:

Previous
From: Richard Broersma
Date:
Subject: Re: what is the PostgreSQL idiom for "insert or update"?
Next
From: Robert Poor
Date:
Subject: Re: what is the PostgreSQL idiom for "insert or update"?