Skip site navigation (1) Skip section navigation (2)

Re: Problem with trigger function in C

From: "Joe Halpin" <jhalpin100(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Problem with trigger function in C
Date: 2008-10-28 20:12:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
Sorry I forgot to add that part. Here's how I did that:

sn=# create function xqueryTrigger() returns trigger as
'/usr/local/lib/postgresql/' language c;
sn=# create trigger tbefore before insert or update on at_xparam
for each row execute procedure xquerytrigger();

Is the function name case sensitive? I had originally named it
xqueryTrigger, but after some error messages which referenced
"xquerytrigger" I renamed it to be all lower case.



On Tue, Oct 28, 2008 at 3:01 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Joe Halpin" <jhalpin100(at)gmail(dot)com> writes:
>> I'm new at this and I apologize if I got the wrong list, but I'm
>> trying to write a trigger function in C which is linked in with
>> libxqilla and is supposed to run an xquery against some xml we have
>> stored in a column. I find that when the function is entered fcinfo is
>> null, which causes a segfault.
> AFAIK the only way fcinfo would be null is if PG didn't think that the
> function was V1 call convention.  I see that you do have the
> PG_FUNCTION_INFO_V1 macro in there, which eliminates the most obvious
> explanation.  Are you sure that the SQL-level CREATE FUNCTION command
> references this function name and not some other one?
>                        regards, tom lane

In response to


pgsql-interfaces by date

Next:From: Tom LaneDate: 2008-10-28 21:01:22
Subject: Re: Problem with trigger function in C
Previous:From: Tom LaneDate: 2008-10-28 20:01:53
Subject: Re: Problem with trigger function in C

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group