Re: Trigger only firing once

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Fran Fabrizio <ffabrizio(at)Exchange(dot)WebMD(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Trigger only firing once
Date: 2001-05-14 23:31:58
Message-ID: 25084.989883118@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Fran Fabrizio <ffabrizio(at)Exchange(dot)WebMD(dot)net> writes:
>> Kinda hard to believe.

> I know it, but that's what I am seeing..... (to recap, my trigger only
> fires on the first insert per connection.)

> [snip]

> ******* Here is the server log this time around *******

> 2001-05-14 12:02:54 DEBUG: StartTransactionCommand
> 2001-05-14 12:02:54 DEBUG: query: insert into log values
> (0,0,lower(''),lower(''),lower(''),lower('hostname.changed.com'),upper('Med'),
> upper('Apps'), upper('Medssld'), upper('INFO'), '1 medssld(s) running.',
> '20010513 00:00:00');
> 2001-05-14 12:02:54 DEBUG: ProcessQuery
> 2001-05-14 12:02:54 DEBUG: CommitTransactionCommand

> ****** Note, NO TRIGGER firing! So I disconnect and reconnect.... *****

This does NOT show that no trigger fired. What it shows is that no
queries within the trigger needed to be recompiled. The log entries
you are looking at come from the parser when a query is compiled, not
from plpgsql execution.

Try adding some "raise NOTICE" or "raise DEBUG" messages to your trigger
procedure to see what's really happening.

(Yes, I know that plpgsql could do with some better tracing/debugging
facilities than it's got. Any volunteers out there?)

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-05-14 23:49:17 Re: FATAL ERROR running query...
Previous Message Chris Smith 2001-05-14 23:08:21 Re: PostgreSQL in Comparison to mySQL