arcapos / luapgsql

Lua binding for PostgreSQL
108 stars 24 forks source link

setNoticeXX functions not releasing previous locked function #52

Open surfskidude opened 6 years ago

surfskidude commented 6 years ago

The documentation states that the new setNoticeXX functions return the previous notice receiver or processor, but the C code (bindings) returns nothing (0). Also, you do not release the previous lock set with luaL_ref if the functions are called again. There are no luaL_unref calls in the code.

I am using your bindings in an environment where the setNoticeXX functions do not work and deadlocks the solution. I would appreciate it if you can add code for optionally removing these two functions by using ifdefs.