Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 8690F64FD7A for ; Tue, 28 Oct 2008 17:01:59 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 74042-03 for ; Tue, 28 Oct 2008 17:01:56 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 1C9FA64FCE8 for ; Tue, 28 Oct 2008 17:01:55 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m9SK1r0t015987; Tue, 28 Oct 2008 16:01:53 -0400 (EDT) To: "Joe Halpin" cc: pgsql-interfaces@postgresql.org Subject: Re: Problem with trigger function in C In-reply-to: <4dc28b160810281234g1292831awf4b8716d64f7f405@mail.gmail.com> References: <4dc28b160810281234g1292831awf4b8716d64f7f405@mail.gmail.com> Comments: In-reply-to "Joe Halpin" message dated "Tue, 28 Oct 2008 14:34:41 -0500" Date: Tue, 28 Oct 2008 16:01:53 -0400 Message-ID: <15986.1225224113@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200810/13 X-Sequence-Number: 6814 "Joe Halpin" 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