(PHP 4 >= 4.2.0, PHP 5)
pg_copy_to() copies a table to an array. It issues COPY TO SQL command internally to retrieve records. The resulting array is returned. It returns FALSE on failure.
See also pg_copy_from().