Re: [HACKERS] Stateful C-language function with state managed by third-party library

2015-03-12 Thread Tom Lane
Denys Rtveliashvili r...@icloud.com writes: My function neeeds to call a third-party library which would create a state and then that state should be kept for the duration of the current query. The library can deallocate that state in a correct way. I understand that fn_extra is normally

[HACKERS] Stateful C-language function with state managed by third-party library

2015-03-10 Thread Denys Rtveliashvili
Hello, My function neeeds to call a third-party library which would create a state and then that state should be kept for the duration of the current query. The library can deallocate that state in a correct way. I understand that fn_extra is normally used for this and usually the state is