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 954B29FA5D8 for ; Sun, 4 Jun 2006 04:40:27 -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 82947-07 for ; Sun, 4 Jun 2006 04:40:18 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by postgresql.org (Postfix) with ESMTP id 7D05F9FA42B for ; Sun, 4 Jun 2006 04:40:18 -0300 (ADT) Received: from [194.25.154.138] (helo=webserv.wug.de) by mrelayeu.kundenserver.de (node=mrelayeu1) with ESMTP (Nemesis), id 0MKwpI-1FmnDc0ntU-0007bQ; Sun, 04 Jun 2006 09:40:16 +0200 Received: from kretschmer by webserv.wug.de with local (Exim 3.36 #1) id 1FmnDa-0000fE-00 for pgsql-performance@postgresql.org; Sun, 04 Jun 2006 09:40:14 +0200 Date: Sun, 4 Jun 2006 09:40:14 +0200 From: "A. Kretschmer" To: pgsql-performance@postgresql.org Subject: Re: INSERT OR UPDATE WITHOUT SELECT Message-ID: <20060604074014.GA2447@webserv.wug-glas.de> References: <20060530_204747_020181.wmiro@ig.com.br> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060530_204747_020181.wmiro@ig.com.br> X-DEST: 208 X-MSMail-Priority: High X-Message-Flag: Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) X-OS: Linux - weil ich es mir Wert bin! X-Info: registrierter Linux-User 97922 http://counter.li.org User-Agent: mutt-ng 1.5.9i (Linux) X-Provags-ID: kundenserver.de abuse@kundenserver.de login:51ea9561fc3f6d9539a2acd743e4748c X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/30 X-Sequence-Number: 19387 am 30.05.2006, um 17:47:47 -0300 mailte wmiro@ig.com.br folgendes: > Hi, > > Is there a command to Insert a record If It does not exists and a update if > It exists? Not a single command, but a solution: http://developer.postgresql.org/docs/postgres/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING HTH, Andreas -- Andreas Kretschmer (Kontakt: siehe Header) Heynitz: 035242/47215, D1: 0160/7141639 GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net === Schollglas Unternehmensgruppe ===