Re: [HACKERS] MERGE-esque Functionallity (was: Adding MERGE to the TODO list (resend with subject)) - Mailing list pgsql-sql

From Mike Rylander
Subject Re: [HACKERS] MERGE-esque Functionallity (was: Adding MERGE to the TODO list (resend with subject))
Date
Msg-id 200405141402.07429.miker@purplefrog.com
Whole thread Raw
List pgsql-sql
On Tuesday 11 May 2004 09:44 am, Bruce Momjian wrote:
[snip]
> > > > Bruce Momjian kirjutas E, 10.05.2004 kell 06:58:
> > > > > Added to TODO:
> > > > >
> > > > >     * Add MERGE command that does UPDATE, or on failure, INSERT
> > > >
[snip]

Hello all.

I have been lurking here for a bit and the MERGE topic (on [HACKERS]) caught
my eye, so I had a go at implementing a basic version of MERGE-on-INSERT in
pl/pgsql.  It is attached below, and any comments are welcome.  I find it
useful on "status" type tables, though it is not very nice when there are
many clients (table locking to avoid race conditions).

Hope someone will find it useful!

-miker









Attachment

pgsql-sql by date:

Previous
From: "Eric Anderson Vianet SAO"
Date:
Subject: view running query
Next
From: Theodore Petrosky
Date:
Subject: Re: where is this problem (trigger)