Re: Postgres Triggers issue - Mailing list pgsql-general

From u235sentinel
Subject Re: Postgres Triggers issue
Date
Msg-id 4B7455B1.70505@gmail.com
Whole thread Raw
In response to Re: Postgres Triggers issue  (Andreas Kretschmer <akretschmer@spamfence.net>)
Responses Re: Postgres Triggers issue
List pgsql-general
Trigger function for an insert/update trigger should return "NEW", not
>>> NULL (OLD - for "on delete" trigger):
>>>
>> It's an AFTER TRIGGER, so the RETURN-Value ignored.
>>
>
> According the doc:
>
> The return value of a BEFORE or AFTER statement-level trigger or an
> AFTER row-level trigger is always ignored; it might as well be null.
>
> http://www.postgresql.org/docs/current/static/plpgsql-trigger.html
>
>
> Andreas
>
We found the problem.  I did some additional digging and learned the
admin in question was trying to trigger on a schema.table that didn't
exist!  Yeah I did slap him around a bit ;-)

remembering the schema part of the name can be important!!  ::grinz::

One further question, so we're doing inserts from a remote source (it's
a radware system feeding us data).  Why would it stop the system from
inserting data when it's an after statement?  I noticed a bunch of
'connection time out' messages in our logs.

It is working so I'm good.  Still it is interesting the feed just
stopped when the trigger was enabled.

Thanks!

pgsql-general by date:

Previous
From: Jeff Ross
Date:
Subject: Re: Memory Usage and OpenBSD
Next
From: Ivan Sergio Borgonovo
Date:
Subject: C function to create tsquery not working