pg_field_size

PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8
pg_field_size - Returns the internal storage size of the named field
Manual
Code Examples

pg_field_size( PgSql\Result$result, int$field ): int

pg_field_size returns the internal storage size (in bytes) of the field number in the given PostgreSQL result.

Note:

This function used to be called pg_fieldsize.

Parameters

result

An PgSql\Result instance, returned by pg_query, pg_query_params or pg_execute(among others).

field

Field number, starting from 0.

Return Values

The internal field storage size (in bytes). -1 indicates a variable length field.

Changelog

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

Related Functions

Example of pg_field_size

Show all examples for pg_field_size

PHP Version:


Function pg_field_size:

PostgreSQL Functions

Most used PHP functions