From: 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: Tue, 30 May 2006 17:05:17 -0400
Message-ID: <36e682920605301405u4d665fcftbe0a97b5753f5209@mail.gmail.com> (raw)
In-Reply-To: <447C8F1D.8090404@shx.com.br>
References: <447C8F1D.8090404@shx.com.br>
On 5/30/06, Waldomiro <waldomiro@shx.com.br> wrote:
> Is there a command to Insert a record If It does not exists and a update if
> It exists?
Sure, it's called MERGE. See http://en.wikipedia.org/wiki/Merge_%28SQL%29> I mean the postgres should test if a record exist before insert and if It
> exist then the postgres must do an update instead an insert.
PostgreSQL does not support MERGE at the moment, sorry.
--
Jonah H. Harris, Software Architect | phone: 732.331.1300
EnterpriseDB Corporation | fax: 732.331.1301
33 Wood Ave S, 2nd Floor | jharris@enterprisedb.com
Iselin, New Jersey 08830 | http://www.enterprisedb.com/
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: jonah.harris@gmail.com, waldomiro@shx.com.br
Subject: Re: INSERT OU UPDATE WITHOUT SELECT?
In-Reply-To: <36e682920605301405u4d665fcftbe0a97b5753f5209@mail.gmail.com>
* 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