Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<pg_set_error_verbositypg_socket_poll>
^PostgreSQL FunctionsLast updated: Mon, 26 Oct 2026

pg_socket

(PHP 5 >= 5.6.0, PHP 7, PHP 8)

pg_socket — Get a read only handle to the socket underlying a PostgreSQL connection

Description

function pg_socket(PgSql\Connection $connection): resource|false

pg_socket() returns a read only resource corresponding to the socket underlying the given PostgreSQL connection.

Warning

This function is currently not documented; only its argument list is available.

Parameters

connection

An PgSql\Connection instance.

Return Values

A socket resource on success or false on failure.

Changelog

Version Description
8.1.0 The connection parameter expects an PgSql\Connection instance now; previously, a resource was expected.

<pg_set_error_verbositypg_socket_poll>
^PostgreSQL FunctionsLast updated: Mon, 26 Oct 2026