6 if (!pq\Types::DEFINED) {
7 die("skip pq\\Types::DEFINED == false\n");
18 $c = new pq\Connection(PQ_DSN);
19 $r = $c->exec("SET timezone TO UTC; SELECT
25 1.1::float4 as float4,
26 2.2::float8 as float8,
27 '2013-01-01'::date as date,
28 1::abstime as abstime,
29 '2013-01-01 01:01:01'::timestamp as timestamp,
30 '2013-01-01 01:01:01 UTC'::timestamptz as timestamptz,
31 array[array[1,2,3],array[4,5,6],array[NULL::int,NULL::int,NULL::int]] as intarray
33 var_dump($r->fetchRow(pq\Result::FETCH_ASSOC));
54 object(pq\DateTime)#%d (4) {
58 string(19) "2013-01-01 00:00:00"
65 object(pq\DateTime)#%d (4) {
67 string(11) "Y-m-d H:i:s"
69 string(19) "1970-01-01 00:00:01"
76 object(pq\DateTime)#%d (4) {
78 string(13) "Y-m-d H:i:s.u"
80 string(19) "2013-01-01 01:01:01"
87 object(pq\DateTime)#%d (4) {
89 string(14) "Y-m-d H:i:s.uO"
91 string(19) "2013-01-01 01:01:01"