When I was in the use of the extension, I doubt pgfunc () this function is a BUG.Such as the code below:
The CREATE or replace the FUNCTION test () RETURNS void AS $$
The local ibase_get_hashdata = pgfunc ([[ibase_get_hashdata (integer, text)]] and {only_internal = false})
The local a = ibase_get_hashdata (4, '368738464')
Print (" -- -- -- -- -- -- -- -- -- -- - > end ')
$$LANGUAGE plluau;
When the function ibase_get_hashdata (4, '368738464') to obtain the value is NULL, namely PG_RETURN_NULL, there will be a segmentation fault.
When I was in single step debugging GDB will find in this function error luaP_pushrecord (L, dat) - > DatumGetHeapTupleHeader (record), the reason is that the record is NULL.
When I was in the use of the extension, I doubt pgfunc () this function is a BUG.Such as the code below: The CREATE or replace the FUNCTION test () RETURNS void AS $$ The local ibase_get_hashdata = pgfunc ([[ibase_get_hashdata (integer, text)]] and {only_internal = false}) The local a = ibase_get_hashdata (4, '368738464') Print (" -- -- -- -- -- -- -- -- -- -- - > end ') $$LANGUAGE plluau; When the function ibase_get_hashdata (4, '368738464') to obtain the value is NULL, namely PG_RETURN_NULL, there will be a segmentation fault. When I was in single step debugging GDB will find in this function error luaP_pushrecord (L, dat) - > DatumGetHeapTupleHeader (record), the reason is that the record is NULL.