|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-07-05 11:37 UTC] derick@php.net
[2006-07-05 11:43 UTC] tony2001@php.net
[2006-07-05 12:06 UTC] unex at linija dot org
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 20:00:01 2025 UTC |
Description: ------------ Seems there is a problem with reference counting. The further example shows how pg_close() dereferences connection instead of just closing one. I'm not sure how PHP works, but this problem could exist deeper than in PostgreSQL extension, but that's really yours competence. Thanks. Reproduce code: --------------- <? $Con1 = pg_connect("dbname=template1"); $Con2 = pg_connect("dbname=template1"); pg_close($Con1); if(!ping($Con2)) echo "Connection 2 was closed too"; else pg_close($Con2); ?> Expected result: ---------------- Only first connection should be closed. Actual result: -------------- Both connections was closed.