pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Safe upsert/merge from servlet
2+ messages / 2 participants
[nested] [flat]

* Safe upsert/merge from servlet
@ 2009-10-16 07:05  Jonas Donovan Hansen <jonasdonovan@hotmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Jonas Donovan Hansen @ 2009-10-16 07:05 UTC (permalink / raw)
  To: pgsql-jdbc

Postgres don't have an upsert/merge command - how does everybody deal with
this from an servlet (multi-thread)?

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Safe upsert/merge from servlet
@ 2009-10-16 14:52  Richard Broersma <richard.broersma@gmail.com>
  parent: Jonas Donovan Hansen <jonasdonovan@hotmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Richard Broersma @ 2009-10-16 14:52 UTC (permalink / raw)
  To: Jonas Donovan Hansen <jonasdonovan@hotmail.com>; +Cc: pgsql-jdbc

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2009-10-16 14:52 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-10-16 07:05 Safe upsert/merge from servlet Jonas Donovan Hansen <jonasdonovan@hotmail.com>
2009-10-16 14:52 ` Richard Broersma <richard.broersma@gmail.com>

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