arcapos / luapgsql

Lua binding for PostgreSQL
108 stars 24 forks source link

NoticeProcessor and NoticeReceiver are global #25

Closed daurnimator closed 7 years ago

daurnimator commented 9 years ago

setNoticeProcessor and setNoticeReceiver set themselves in a global context; meaning all PGconns in one lua state end up sharing the same callbacks. This isn't acceptable for libraries that use luapgsql underneath.

daurnimator commented 9 years ago

The commit 6ae871869598491a1da6bab00484a3f17759568a should help fix things up by providing a place to store the lua functions.

daurnimator commented 7 years ago

@mbalmer can we solve this soon?

mbalmer commented 7 years ago

I have just commited a new version that make noticeReceiver and noticeProcessor per connection and added a sample program in notice.lua.