pg_close

(PHP 4, PHP 5, PHP 7)

pg_close�ر�һ�� PostgreSQL ����

˵��

pg_close ([ resource $connection ] ) : bool

pg_close() �ر���������Դ connection ָ���ĵ� PostgreSQL ���ݿ�ķdz־����ӡ�

Note:

ʹ�� pg_close() �����ܱ�Ҫ����Ϊ�dz־������ڱ��ű�ִ�н�������Զ��رա�

����ڴ������д��� large object ��Դ�����ڹر����� large object ��Դ֮ǰ��Ҫ�ر����ӡ�

����

connection

PostgreSQL database connection resource. When connection is not present, the default connection is used. The default connection is the last connection made by pg_connect() or pg_pconnect().

����ֵ

�ɹ�ʱ���� TRUE�� ������ʧ��ʱ���� FALSE��

����

Example #1 pg_close() ����

<?php
$dbconn 
pg_connect("host=localhost port=5432 dbname=mary")
   or die(
"Could not connect");
echo 
"Connected successfully";
pg_close($dbconn);
?>

�������̻������

Connected successfully

�μ�