Home > PHP > Function > PostgreSQL > pg_field_size()

pg_field_size()

pg_field_size - Returns the internal storage size of the named field

Syntax

int pg_field_size (resource $result, int $field_number)

Arguments

  • result - PostgreSQL query result resource, returned by pg_query(), pg_query_params() or pg_execute() (among others).
  • field_number - Field number, starting from 0.

Description

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

Version

PHP 4.2.0, 5

Return value

The internal field storage size (in bytes). -1 indicates a variable length field. FALSE is returned on error.