pllua / pllua-deprecated

[DEPRECATED] This repository is no longer maintained. Please follow https://github.com/pllua/pllua
197 stars 16 forks source link

pg_func #33

Closed floatrain closed 8 years ago

floatrain commented 8 years ago

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.

eugwne commented 8 years ago

Thank you. Now should be working.