X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id D90A3D1B502 for ; Thu, 18 Sep 2003 13:41:44 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 70654-03 for ; Thu, 18 Sep 2003 10:41:17 -0300 (ADT) Received: from metalogic.efinity.info (82-68-30-99.dsl.in-addr.zen.co.uk [82.68.30.99]) by svr1.postgresql.org (Postfix) with ESMTP id 268C2D1B4EB for ; Thu, 18 Sep 2003 10:41:13 -0300 (ADT) Received: by metalogic.efinity.info (Efinity, from userid 0) id EEAD3418012; Thu, 18 Sep 2003 14:41:15 +0100 (BST) Received: from goofelvis (geoff.planmatics.co.uk [194.201.29.175]) by metalogic.efinity.info (Efinity) with SMTP id DA180418012 for ; Thu, 18 Sep 2003 14:41:07 +0100 (BST) Reply-To: From: "Geoff Ellis" To: Subject: Testing for a record before update or insert without using a function. Date: Thu, 18 Sep 2003 14:41:09 +0100 Message-ID: <006401c37dea$8656ca80$af1dc9c2@goofelvis> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.6604 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal X-Mailscan: v3.08.27d SPAMFlags [00000000-00000000-00000000-00000000-00000000] Spamness [0/100] X-Message: Scanned for viruses by Efinity http://www.smtnet.co.uk/efinity X-Info: "geoff@metalogicplc.com" -- pgsql-admin@postgresql.org X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/307 X-Sequence-Number: 10395 Is it possible to test if a record exists in a table and then if it does do an update on that table or if it doesn't do an insert ? I've looked around the documents and it seems everything points towards a function? Is this the only way or has someone done this before..... TIA Geoff