Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id ABAF3B5DC23 for ; Thu, 8 Sep 2011 12:12:45 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 96216-05 for ; Thu, 8 Sep 2011 15:12:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.yitter.info (mail.yitter.info [208.86.224.201]) by mail.postgresql.org (Postfix) with ESMTP id EAB76B5DC25 for ; Thu, 8 Sep 2011 12:12:37 -0300 (ADT) Received: from shinkuro.com (69-196-144-227.dsl.teksavvy.com [69.196.144.227]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.yitter.info (Postfix) with ESMTPSA id D71451ECB41D for ; Thu, 8 Sep 2011 15:12:34 +0000 (UTC) Date: Thu, 8 Sep 2011 11:12:36 -0400 From: Andrew Sullivan To: pgsql-general@postgresql.org Subject: Re: conditional insert Message-ID: <20110908151235.GE38973@shinkuro.com> Mail-Followup-To: Andrew Sullivan , pgsql-general@postgresql.org References: <4E64A79E.7030503@compulab.co.il> <4E64AC45.6030704@rem.nl> <20110906190548.433E8B5DBD1@mail.postgresql.org> <4e679195.12848e0a.019e.ffff918eSMTPIN_ADDED@mx.google.com> <20110907200454.GV35347@shinkuro.com> <20110908143203.0C3AFB5DBCB@mail.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110908143203.0C3AFB5DBCB@mail.postgresql.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201109/230 X-Sequence-Number: 179588 On Thu, Sep 08, 2011 at 10:31:39PM +0800, Lincoln Yeoh wrote: > > Doesn't catching the failure and retrying mean writing more code? Well, yes. OTOH, if you want to use "upsert" and you have to use other database systems too, then you'll need that other code also, since it's not standard. There isn't an easy answer here. A -- Andrew Sullivan ajs@crankycanuck.ca