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