|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-03-25 19:35 UTC] jani@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 02:00:01 2025 UTC |
Description: ------------ PHP Version is 5.1.6 PostgreSQL(libpq) Version 8.1.6 Hi, 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 'ggg','hhh' 'rrrr','tttt' Problem 2: the page should be ready quickly; Actual result: -------------- Only one record is 'ggg','hhh' Problem 2: the page takes the same time as using pg_query();