Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id AC68F633A72 for ; Fri, 16 Oct 2009 11:52:45 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 16360-08 for ; Fri, 16 Oct 2009 14:52:37 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pz0-f193.google.com (mail-pz0-f193.google.com [209.85.222.193]) by mail.postgresql.org (Postfix) with ESMTP id B31E5633751 for ; Fri, 16 Oct 2009 11:52:37 -0300 (ADT) Received: by pzk31 with SMTP id 31so1834840pzk.28 for ; Fri, 16 Oct 2009 07:52:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=xZg9XVf5aLpQvPDLEt4N16o5hvK/VfmCCROWO+XoQs8=; b=NMW8sbJX8P70brE5XZzs4QLNieg/I7kPbafsq+uu8DOYwqJdfchJwfSVAHWyb8HtoQ Kv/jXtz/yhZAX/9HDv8zEfko3FXelQ04WPs4qRBauJbQEHZu45oZ9X80LYQsiCTgOZ4P x8WEvBx1A+CS/0MR1oKG+uwHaGhyyuWA8rNA0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=T0WR7Vfy65s46DQ7/LaI+mMM/MjLTthlwB+g++m2EZVXJ8rhTyYkmFr/6nAA9cXJdY UefynWue007mm2Da/+HpT7YnvaIgtrixoaeEid0Tex6l2QD+WuuZ5HRGY9h4nYHyBPf4 Tq7kVTxI4QG2MFOrk11QFwB3oxpI2C2AzPqNo= MIME-Version: 1.0 Received: by 10.115.116.4 with SMTP id t4mr1600929wam.106.1255704755337; Fri, 16 Oct 2009 07:52:35 -0700 (PDT) In-Reply-To: References: Date: Fri, 16 Oct 2009 07:52:35 -0700 Message-ID: <396486430910160752w4d7834d0of3287e174e65d846@mail.gmail.com> Subject: Re: Safe upsert/merge from servlet From: Richard Broersma To: Jonas Donovan Hansen Cc: pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200910/13 X-Sequence-Number: 20015 On Fri, Oct 16, 2009 at 12:05 AM, Jonas Donovan Hansen wrote: > Postgres don=92t have an upsert/merge command =96 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-structu= res.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 --=20 Regards, Richard Broersma Jr. Visit the Los Angeles PostgreSQL Users Group (LAPUG) http://pugs.postgresql.org/lapug