pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Broersma <richard.broersma@gmail.com>
To: Jonas Donovan Hansen <jonasdonovan@hotmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Safe upsert/merge from servlet
Date: Fri, 16 Oct 2009 07:52:35 -0700
Message-ID: <396486430910160752w4d7834d0of3287e174e65d846@mail.gmail.com> (raw)
In-Reply-To: <BLU137-DS3D602E4225C9897F98292C5C40@phx.gbl>
References: <BLU137-DS3D602E4225C9897F98292C5C40@phx.gbl>

On Fri, Oct 16, 2009 at 12:05 AM, Jonas Donovan Hansen
<jonasdonovan@hotmail.com> wrote:
> Postgres don’t have an upsert/merge command – how does everybody deal with
> this from an servlet (multi-thread)?


Postgresql doesn't have support for merge at this time as an SQL
command.  However, I've seen some functions developed to simulate
this: http://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#PLPGSQL-UPSERT-EXAMPLE

Regarding the second point, the manual show the capabilities of the
JDBC driver and postgresql:
http://jdbc.postgresql.org/documentation/84/thread.html

-- 
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug



view thread (2+ messages)

Message-ID: <396486430910160752w4d7834d0of3287e174e65d846@mail.gmail.com>
Permalink:  ../396486430910160752w4d7834d0of3287e174e65d846@mail.gmail.com/
Also on:    postgresql.org/message-id/396486430910160752w4d7834d0of3287e174e65d846@mail.gmail.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: richard.broersma@gmail.com, jonasdonovan@hotmail.com
  Subject: Re: Safe upsert/merge from servlet
  In-Reply-To: <396486430910160752w4d7834d0of3287e174e65d846@mail.gmail.com>
  References: <BLU137-DS3D602E4225C9897F98292C5C40@phx.gbl> <396486430910160752w4d7834d0of3287e174e65d846@mail.gmail.com>

* 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