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 61ACC9FA5E9 for ; Tue, 30 May 2006 17:48:02 -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 14367-05 for ; Tue, 30 May 2006 17:47:53 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from smtp-32.ig.com.br (smtp-32.ig.com.br [200.226.132.32]) by postgresql.org (Postfix) with ESMTP id CC99F9FADD1 for ; Tue, 30 May 2006 17:47:52 -0300 (ADT) Received: (qmail 5095 invoked from network); 30 May 2006 20:47:46 -0000 Received: from 70.131.226.200.in-addr.arpa.ig.com.br (HELO localhost.localdomain) ([200.226.131.70]) (envelope-sender ) by email-32.ig.com.br (qmail-ldap-1.03) with SMTP for ; 30 May 2006 20:47:46 -0000 To: pgsql-performance@postgresql.org From: wmiro@ig.com.br Subject: INSERT OR UPDATE WITHOUT SELECT Date: Tue, 30 May 2006 17:47:47 -0300 X-Priority: 3 (Normal) Message-ID: <20060530_204747_020181.wmiro@ig.com.br> X-Originating-IP: [10.17.1.70]192.168.3.243, 200.171.147.216 X-Mailer: iGMail [www.ig.com.br] X-user: wmiro@ig.com.br Teste: asaes MIME-Version: 1.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.846 tagged_above=0 required=5 tests=AWL, BAYES_40, FORGED_RCVD_HELO, RCVD_IN_NJABL_PROXY, SUBJ_ALL_CAPS X-Spam-Level: * Content-Description: Mail message body Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Archive-Number: 200606/26 X-Sequence-Number: 19383 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.