pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Waldomiro <waldomiro@shx.com.br>
To: pgsql-performance@postgresql.org
Subject: INSERT OU UPDATE WITHOUT SELECT?
Date: Tue, 30 May 2006 15:29:49 -0300
Message-ID: <447C8F1D.8090404@shx.com.br> (raw)

Hi,

Is there a command to Insert a record If It does not exists and a update 
if It exists?

I do not want to do a select before a insert or update.

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.

Thanks,

WMiro.

view thread (7+ messages)  latest in thread

Message-ID: <447C8F1D.8090404@shx.com.br>
Permalink:  ../447C8F1D.8090404@shx.com.br/
Also on:    postgresql.org/message-id/447C8F1D.8090404@shx.com.br

 · 

reply

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: waldomiro@shx.com.br
  Subject: Re: INSERT OU UPDATE WITHOUT SELECT?
  In-Reply-To: <447C8F1D.8090404@shx.com.br>

* 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