X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 124779FB0D1 for ; Tue, 30 May 2006 15:53:39 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 97476-05 for ; Tue, 30 May 2006 15:53:34 -0300 (ADT) X-Greylist: delayed 00:27:47.580025 by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 628B09FB1B9 for ; Tue, 30 May 2006 15:53:30 -0300 (ADT) Received: from burta.hst.terra.com.br (burta.hst.terra.com.br [200.176.10.199]) by svr4.postgresql.org (Postfix) with ESMTP id 8E1795AFA09 for ; Tue, 30 May 2006 18:25:42 +0000 (GMT) Received: from caliope.hst.terra.com.br (caliope.hst.terra.com.br [200.176.10.8]) by burta.hst.terra.com.br (Postfix) with ESMTP id 24EE64B78094 for ; Tue, 30 May 2006 15:25:35 -0300 (BRT) X-Terra-Karma: -2% X-Terra-Hash: c8335fc1d0ecf755e79b71f0e33385bb Received-SPF: none (caliope.hst.terra.com.br: 200.176.10.8 is neither permitted nor denied by domain of shx.com.br) client-ip=200.176.10.8; envelope-from=waldomiro@shx.com.br; helo=[192.168.3.243]; Received: from [192.168.3.243] (unknown [200.207.161.27]) (authenticated user shx134) by caliope.hst.terra.com.br (Postfix) with ESMTP id BDA4D1BD4129 for ; Tue, 30 May 2006 15:25:34 -0300 (BRT) Message-ID: <447C8F1D.8090404@shx.com.br> Date: Tue, 30 May 2006 15:29:49 -0300 From: Waldomiro User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: pt-br, pt MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: INSERT OU UPDATE WITHOUT SELECT? Content-Type: multipart/alternative; boundary="------------090707040903070803030802" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.305 tagged_above=0 required=5 tests=BAYES_00, HTML_50_60, HTML_MESSAGE, HTML_TITLE_EMPTY, RCVD_IN_BL_SPAMCOP_NET, SUBJ_ALL_CAPS X-Spam-Level: X-Archive-Number: 200605/549 X-Sequence-Number: 19336 This is a multi-part message in MIME format. --------------090707040903070803030802 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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. --------------090707040903070803030802 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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.


--------------090707040903070803030802--