From: PFC <lists@peufeu.com>
To: Jonah H. Harris <jonah.harris@gmail.com>
To: Waldomiro <waldomiro@shx.com.br>
Cc: pgsql-performance@postgresql.org
Subject: Re: INSERT OU UPDATE WITHOUT SELECT?
Date: Wed, 31 May 2006 00:35:15 +0200
Message-ID: <op.tadyc1jwcigqcu@apollo13> (raw)
In-Reply-To: <36e682920605301405u4d665fcftbe0a97b5753f5209@mail.gmail.com>
References: <447C8F1D.8090404@shx.com.br>
<36e682920605301405u4d665fcftbe0a97b5753f5209@mail.gmail.com>
> PostgreSQL does not support MERGE at the moment, sorry.
Issue an UPDATE, and watch the rowcount ; if the rowcount is 0, issue an
INSERT.
Be prepared to retry if another transaction has inserted the row
meanwhile, though.
MERGE would be really useful.
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: lists@peufeu.com, jonah.harris@gmail.com, waldomiro@shx.com.br
Subject: Re: INSERT OU UPDATE WITHOUT SELECT?
In-Reply-To: <op.tadyc1jwcigqcu@apollo13>
* 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