Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 3CCFE9F9854 for ; Sun, 21 Oct 2007 11:18:47 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 35156-02 for ; Sun, 21 Oct 2007 11:18:33 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by postgresql.org (Postfix) with ESMTP id 8252C9F94B8 for ; Sun, 21 Oct 2007 11:18:41 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id j3so794786ugf for ; Sun, 21 Oct 2007 07:18:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=Ymto/DKhy1vBw46W+fQbCe53Fk6gYlBYoKaWB8iwigo=; b=Phwj7nlNvNzb7JPHmf2mJMIkTVP/INxMXxr+Lci44VV9OyRhJoD9l6BuoWLwmJQMJUWXGtoQQ4aU2wawBfn7Kawu1aJPCDuMT75LUQGJLbvtbk6IwOM9ZKQ2xElOweeMXxBo989c4SYMEqgHt44b3DLKUJybXKN81u3t39GfoVk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=FuKC1iB+QVvH1DZRnquP2bKFpbL417zxqc2VEuQsVrCefIB/G64n2OBl2Sc1VfxnkRkgmhwsjmE8xpboGIwt5hKdtrkvqYJpbZIFfeI4NEtbctgUsGT4HhpmDxjSD9z6RNCuU53lIFUEu1KhDliPBMpclXxUYhoJBK/7fgSksEQ= Received: by 10.67.19.11 with SMTP id w11mr5142721ugi.1192976319528; Sun, 21 Oct 2007 07:18:39 -0700 (PDT) Received: by 10.67.29.6 with HTTP; Sun, 21 Oct 2007 07:18:39 -0700 (PDT) Message-ID: Date: Sun, 21 Oct 2007 09:18:39 -0500 From: "Scott Marlowe" To: yogesh Subject: Re: Trigger AFTER UPDATE OR INSERT Cc: pgsql-admin@postgresql.org In-Reply-To: <1192860050.514202.74290@v23g2000prn.googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1192777762.618697.226800@e34g2000pro.googlegroups.com> <1192860050.514202.74290@v23g2000prn.googlegroups.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/201 X-Sequence-Number: 27115 On 10/20/07, yogesh wrote: > On Oct 19, 11:05 pm, scott.marl...@gmail.com ("Scott Marlowe") wrote: > > Yes, it's right. Triggers are part of a transaction (or run their > > own) so if the trigger fails, so does the transaction. > > > > If you really need to have something insert rather or not the > > transaction succeeds, you can either use savepoints so that you can > > roll back to before the error then insert the row anyway, or use > > dblink to connect to the db through another backend and commit your > > data that way. > > > > You might want to give more info on exactly what you're trying to do > > so the folks on the list can make better informed recommendations. > Hello Scott, > Thanks to you.... > you got the right point point what i want to know....... > > are you saying about programming or any other way to done > it........to insert a row even if the Trigger fails or succeeds Read up on savepoints here: http://www.postgresql.org/docs/8.2/static/sql-savepoint.html