Re: Row insertion w/ trigger to another table update causes row insertion to _not_ occur

From: Sim Zacks <sim(at)compulab(dot)co(dot)il>
To: Ow Mun Heng <ow(dot)mun(dot)heng(at)wdc(dot)com>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, pgsql-general(at)postgresql(dot)org
Subject: Re: Row insertion w/ trigger to another table update causes row insertion to _not_ occur
Date: 2009-07-22 04:50:28
Message-ID: 4A669A94.1050008@compulab.co.il
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html style="direction: ltr;">
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body style="direction: ltr;" bgcolor="#ffffff" text="#000000">
<p style="margin-bottom: 0cm; margin-top: 0pt;">Ow Mun Heng wrote:<br>
</p>
<blockquote
cite="mid:D1109E8B2FB53A45BDB60F8145905CE902DB3D81(at)wdmyexbe03(dot)my(dot)asia(dot)wdc(dot)com"
type="cite">
<pre wrap="">-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:gsstark(at)gmail(dot)com">gsstark(at)gmail(dot)com</a> [<a class="moz-txt-link-freetext" href="mailto:gsstark(at)gmail(dot)com">mailto:gsstark(at)gmail(dot)com</a>] On Behalf Of Greg Stark
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">On Tue, Jul 21, 2009 at 11:25 PM, Ow Mun Heng<a class="moz-txt-link-rfc2396E" href="mailto:ow(dot)mun(dot)heng(at)wdc(dot)com">&lt;ow(dot)mun(dot)heng(at)wdc(dot)com&gt;</a> wrote:
&nbsp; &nbsp;RETURN NULL;
</pre>
</blockquote>
</blockquote>
<blockquote type="cite">
<pre wrap="">Just make your trigger return NEW and it won't kill the insert to the
child table.
</pre>
</blockquote>
<pre wrap=""><!---->
Dang it.. I just re-read the online docs this morning and I missed it.
Then again, since I'm new to triggers, I may have mis-interpreted that.

Thanks for it. I'll give it a go.</pre>
</blockquote>
I agree that is certainly one problem, but in any case an After Update
trigger would have worked.<br>
</body>
</html>

Attachment Content-Type Size
unknown_filename text/html 1.5 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ow Mun Heng 2009-07-22 05:53:32 Re: Row insertion w/ trigger to another table update causes row insertion to _not_ occur
Previous Message Aleksander Kmetec 2009-07-22 02:17:26 Re: Inserts into sl_log tables timing out (related to the dataloss bug)