Re: Safe upsert/merge from servlet

From: Richard Broersma <richard(dot)broersma(at)gmail(dot)com>
To: Jonas Donovan Hansen <jonasdonovan(at)hotmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Safe upsert/merge from servlet
Date: 2009-10-16 14:52:35
Message-ID: 396486430910160752w4d7834d0of3287e174e65d846@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Fri, Oct 16, 2009 at 12:05 AM, Jonas Donovan Hansen
<jonasdonovan(at)hotmail(dot)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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2009-10-16 22:57:28 Re: TimeZone related issues in org.postgresql.jdbc2.TimestampUtils
Previous Message Jonas Donovan Hansen 2009-10-16 07:05:42 Safe upsert/merge from servlet