Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old October 9th, 2008, 06:35 PM
Roberto
Guest
 
Posts: n/a
Default PostgreSQL Equivalent of mysql_unbuffered_query

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.
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles