Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TQGTA-0001vy-Cl for pgsql-sql@postgresql.org; Mon, 22 Oct 2012 11:46:56 +0000 Received: from plane.gmane.org ([80.91.229.3]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TQGT1-0007rw-NI for pgsql-sql@postgresql.org; Mon, 22 Oct 2012 11:46:56 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TQGT5-0006OU-CT for pgsql-sql@postgresql.org; Mon, 22 Oct 2012 13:46:51 +0200 Received: from ip-118-90-52-6.xdsl.xnet.co.nz ([118.90.52.6]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Oct 2012 13:46:51 +0200 Received: from jasen by ip-118-90-52-6.xdsl.xnet.co.nz with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Oct 2012 13:46:51 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-sql@postgresql.org From: Jasen Betts Subject: Re: Trigger triggered from a foreign key Date: 22 Oct 2012 11:29:34 GMT Organization: Dis (not Dat) Organisation Lines: 11 Message-ID: References: <50819898.9090508@caido.ro> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ip-118-90-52-6.xdsl.xnet.co.nz X-Face: ?)Aw4rXwN5u0~$nqKj`xPz>xHCwgi^q+^?Ri*+R(&uv2=E1Q0Zk(>h!~o2ID@6{uf8s; a +M[5[U[QT7xFN%^gR"=tuJw%TXXR'Fp~W; (T"1(739R%m0Yyyv*gkGoPA.$b,D.w:z+<'"=-lVT?6 {T?=R^:W5g|E2#EhjKCa+nt":4b}dU7GYB*HBxn&Td$@f%.kl^:7X8rQWd[NTc"P"u6nkisze/Q; 8 "9Z{peQF,w)7UjV$c|RO/mQW/NMgWfr5*$-Z%u46"/00mx-,\R'fLPe.)^ User-Agent: slrn/pre1.0.0-18 (Linux) X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201210/48 X-Sequence-Number: 36919 On 2012-10-19, Victor Sterpu wrote: > I have this trigger that works fine. The trigger prevents the deletion > of the last record. > But I want skip this trigger execution when the delete is done from a > external key. > How can I do this? perhaps you have to use a rule instead of a trigger? -- ⚂⚃ 100% natural