class pq\Types implements ArrayAccess

Accessor to the PostgreSQL pg_type relation. See here for an overview.

Example:

<?php

$connection = new pq\Connection;
$types = new pq\Types($connection);
foreach ($types["int2vector"] as $key=>$val) {
    printf("%-20s = %s\n", $key, is_bool($val) ? ($val?'t':'f') : $val);
}

?>

Yields:

oid                  = 22
typname              = int2vector
typnamespace         = 11
typowner             = 10
typlen               = -1
typbyval             = f
typtype              = b
typcategory          = A
typispreferred       = f
typisdefined         = t
typdelim             = ,
typrelid             = 0
typelem              = 21
typarray             = 1006
typinput             = int2vectorin
typoutput            = int2vectorout
typreceive           = int2vectorrecv
typsend              = int2vectorsend
typmodin             = -
typmodout            = -
typanalyze           = -
typalign             = i
typstorage           = p
typnotnull           = f
typbasetype          = 0
typtypmod            = -1
typndims             = 0
typcollation         = 0
typdefaultbin        = 
typdefault           = 
typacl               = 

NOTE:
The following OID constants are obtained from stock PostgreSQL 9.3.5. Types from f.e. extensions can be accessed through the ArrayAccess interface of pq\Types.

Constants:

Properties:

Functions: