Do you have a question? Post it now! No Registration Necessary. Now with pictures!
October 9, 2008, 5:31 pm
rate this thread
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.
- » ternary operator or if() statement for default value?
- — Next thread in » PHP Scripting Forum