Re: question about postgres persistent connection in php
| От | Christopher Kings-Lynne | 
|---|---|
| Тема | Re: question about postgres persistent connection in php | 
| Дата | |
| Msg-id | 4248FE1D.8070304@familyhealth.com.au обсуждение исходный текст  | 
		
| Ответ на | question about postgres persistent connection in php ("Yulius Tjahjadi" <yulius@xfire.com>) | 
| Список | pgsql-php | 
> A majority of our sql statements in the logs are BEGIN; ROLLBACK;
> that is created by the php persistent connection and I want to
> see if I can get rid of them.
Try changing these lines:
         orig = PGG(ignore_notices);
         PGG(ignore_notices) = 1;
         res = PQexec(link,"BEGIN;");
         PQclear(res);
         res = PQexec(link,"ROLLBACK;");
         PQclear(res);
         PGG(ignore_notices) = orig;
to this:
         if ((PQprotocolVersion(link) >= 3 && PQtransactionStatus(link)
!= PQTRANS_IDLE) || PQprotocolVersion(link) < 3)
         {
                 orig = PGG(ignore_notices);
                 PGG(ignore_notices) = 1;
                 res = PQexec(link,"ROLLBACK;");
                 PQclear(res);
                 PGG(ignore_notices) = orig;
         }
And recompile.
Chris
		
	В списке pgsql-php по дате отправления: