brianc / node-pg-native

Native (C/C++) bindings to PostgreSQL with sync and async options.
247 stars 44 forks source link

How to unprepare (sync) a statement? #28

Closed silvioprog closed 8 years ago

silvioprog commented 9 years ago

Hello,

I'm using node-pg-native a lot, this is a great module! =)

I have a question: can I unprepare a prepared statement (Something like unprepareSync)?

I'm unpreparing it by disconnecting from the database, but I believe that this isn't the best practice to do that. =/

silvioprog commented 9 years ago

Hm... I saw the DEALLOCATE feature, so I solved my problem just calling querySync('DEALLOCATE ' + myStatement).

It would be nice if node-pg-native could implement the unprepareSync feature (calling DEALLOCATE internally). =)