|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44509 pg_send_execute() does not work and pg_send_query() is blocking
Submitted: 2008-03-23 04:23 UTC Modified: 2008-03-25 19:35 UTC
From: andre dot baggio at bol dot com dot br Assigned:
Status: Not a bug Package: PostgreSQL related
PHP Version: 5.1.6 OS: Linux hm517 2.6.9-67.0.4.ELsmp #
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: andre dot baggio at bol dot com dot br
New email:
PHP Version: OS:


 [2008-03-23 04:23 UTC] andre dot baggio at bol dot com dot br
PHP Version is 5.1.6
PostgreSQL(libpq) Version  8.1.6  


Problem 1:
In this code, the part 1 with pg_send_query()
stores one record in the DB. (it's ok)

the part 2 with the pg_send_prepare() and pg_send_excute()
DOESN'T stores the record in the DB.

Problem 2:
Besides , when I use: 
pg_send_query($con,"select my_slow_func()");
sending a very slow query, the page takes the same time to be ready,
as if it was using pg_query().
 but it was supposed that will be fast;
It seems that the pg_send_query is been bloking.

Reproduce code:
///part 1
  $query = "insert into teste (dt_ini,dt_fim) values ('ggg','hhh')";
  $qq = pg_send_query($connrc,$query);

/// part 2
  $query = "insert into teste (dt_ini,dt_fim) values ('rrrr','tttt')";
  pg_send_prepare($connrc, "my_query", $query);

  if (!pg_connection_busy($connrc) )
      pg_send_execute($connrc, "my_query");

Expected result:
I expected 2 records in the database

Problem 2:
the page should be ready quickly;

Actual result:
Only one record is 

Problem 2:
the page takes the same time as using pg_query();


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-03-25 19:35 UTC]
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jul 18 17:01:29 2024 UTC