Re: Problem with trigger function in C
От | Joe Halpin |
---|---|
Тема | Re: Problem with trigger function in C |
Дата | |
Msg-id | 4dc28b160810281312m7f9c7635sf60502bef468a77b@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Problem with trigger function in C (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Problem with trigger function in C
|
Список | 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/xqueryTrigger.so' language c; CREATE FUNCTION sn=# create trigger tbefore before insert or update on at_xparam for each row execute procedure xquerytrigger(); CREATE TRIGGER 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. Thanks Joe On Tue, Oct 28, 2008 at 3:01 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > "Joe Halpin" <jhalpin100@gmail.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 >
В списке pgsql-interfaces по дате отправления: