<?php
$dbconn = pg_connect("dbname=publisher") or die("Could not connect");
// 'title' は varchar 型であると仮定する
$res = pg_query($dbconn, "select title from authors where author = 'Orwell'");
echo "Title field type OID: ", pg_field_type_oid($res, 0);
?>
Title field type OID: 1043