Re: runtime error on SPGIST, needed help - Mailing list pgsql-hackers

From Tom Lane
Subject Re: runtime error on SPGIST, needed help
Date
Msg-id 16392.1208016038@sss.pgh.pa.us
Whole thread Raw
In response to runtime error on SPGIST, needed help  ("Simone Campora" <simone.campora@gmail.com>)
Responses Re: runtime error on SPGIST, needed help  ("Simone Campora" <simone.campora@gmail.com>)
List pgsql-hackers
"Simone Campora" <simone.campora@gmail.com> writes:
> I first want to implement it and to make it works, like this:

> SPGIST_FUNCTION(pquad_equals_op)
> {
>     elog (NOTICE, "1");

>     Point *p1 = (Point *)PG_GETARG_POINTER(0);
>     Point *p2 = (Point *)PG_GETARG_POINTER(1);

>     elog (NOTICE, "2");

(1) are you sure this function is marked as being V1 calling convention?
Maybe "SPGIST_FUNCTION" takes care of that for you but I don't know.

(2) since you neither marked it STRICT nor defended against nulls in the
function body, I'd fully expect a crash on a null input ... does that
table contain any null points?

> Could anyone suggest me a good runtime debugger for that purpose?

Any C debugger should work fine.  gdb and ddd are the most common
tools around this project, I think.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Simone Campora"
Date:
Subject: runtime error on SPGIST, needed help
Next
From: "Dawid Kuroczko"
Date:
Subject: Re: Cached Query Plans (was: global prepared statements)