X-Original-To: pgsql-interfaces-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id A97D49FB235 for ; Fri, 28 Jul 2006 13:08:06 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 57704-08 for ; Fri, 28 Jul 2006 13:07:57 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id B0BD29FB26A for ; Fri, 28 Jul 2006 13:07:26 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k6SG7Pbb025009; Fri, 28 Jul 2006 12:07:25 -0400 (EDT) To: vivek@staff.ownmail.com cc: pgsql-interfaces@postgresql.org Subject: Re: SPI_getvalue gives a core dump In-reply-to: <200607281535.k6SFZ5EV014757@mail009.ownmail.com> References: <200607281535.k6SFZ5EV014757@mail009.ownmail.com> Comments: In-reply-to message dated "Fri, 28 Jul 2006 21:05:05 +0530" Date: Fri, 28 Jul 2006 12:07:25 -0400 Message-ID: <25008.1154102845@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.051 tagged_above=0 required=5 tests=AWL, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200607/13 X-Sequence-Number: 6203 writes: > I dont know where am i going wrong. Here is the source. > TriggerData *trigdata = (TriggerData *) fcinfo->context; > TupleDesc tupdesc; > if (CALLED_AS_TRIGGER(fcinfo)) { ==================== it comes here and enters inside. > userfield=SPI_getvalue(trigdata->tg_trigtuple,tupdesc,17); ================== it fails here because i tried to get logs before this statement and it succeeded. Wrong tupdesc maybe? You didn't show us what you are setting tupdesc to. regards, tom lane