By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,949 Members | 1,869 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,949 IT Pros & Developers. It's quick & easy.

PostgreSQL Equivalent of mysql_unbuffered_query

P: n/a
Is there such a thing as the equivalent of a mysql_unbuffered_query
for PostgreSQL for doing fast inserts, updates, and deletes (one
liners, not bulk) in cases where you don't care about the outcome
immediately? (Such as deleting a user account from a users table.)

All I could find was pg_send_query, but:

(a) You must check to see if the connection is busy with
pg_connection_busy before sending stuff or you could lose your data
that you're sending or error out.

(b) You must call pg_get_result() after sending the query and before
sending your next query or you could end up getting an error or losing
that next data you are trying to write.

Seems to me that if I have to make two extra API calls and a while
loop on pg_connection_busy with a counter failsafe just to use
pg_send_query, then it's not going to give me the performance boost
that I'm looking for.
Oct 9 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.