1 # class pq\Types implements ArrayAccess
3 Accessor to the PostgreSQL `pg_type` relation.
4 See [here for an overview](pq/Types/:%20Overview).
10 $connection = new pq\Connection;
11 $types = new pq\Types($connection);
12 foreach ($types["int2vector"] as $key=>$val) {
13 printf("%-20s = %s\n", $key, is_bool($val) ? ($val?'t':'f') : $val);
18 Yields for a PostgreSQL v9.3 server:
34 typinput = int2vectorin
35 typoutput = int2vectorout
36 typreceive = int2vectorrecv
37 typsend = int2vectorsend
53 The following OID constants are obtained from the postgres server headers at build time and differ
54 between major versions. Dynamic type information, f.e. from extensions or the actual version of
55 the postgres connected to, can be accessed through the ArrayAccess interface of pq\Types.
60 OID of the `bool` type.
62 OID of the `bytea` type.
64 OID of the `char` type.
66 OID of the `name` type.
68 OID of the `int8` type.
70 OID of the `int2` type.
72 OID of the `int2vector` type.
74 OID of the `int4` type.
76 OID of the `regproc` type.
78 OID of the `text` type.
80 OID of the `oid` type.
82 OID of the `tid` type.
84 OID of the `xid` type.
86 OID of the `cid` type.
88 OID of the `oidvector` type.
90 OID of the `pg_type` type.
92 OID of the `pg_attribute` type.
94 OID of the `pg_proc` type.
96 OID of the `pg_class` type.
98 OID of the `json` type.
100 OID of the `xml` type.
102 OID of the `xmlarray` type.
104 OID of the `jsonarray` type.
106 OID of the `pg_node_tree` type.
108 OID of the `smgr` type.
110 OID of the `point` type.
112 OID of the `lseg` type.
114 OID of the `path` type.
116 OID of the `box` type.
118 OID of the `polygon` type.
120 OID of the `line` type.
122 OID of the `linearray` type.
124 OID of the `float4` type.
126 OID of the `float8` type.
128 OID of the `unknown` type.
130 OID of the `circle` type.
132 OID of the `circlearray` type.
134 OID of the `money` type.
136 OID of the `moneyarray` type.
138 OID of the `macaddr` type.
140 OID of the `inet` type.
142 OID of the `cidr` type.
144 OID of the `boolarray` type.
146 OID of the `byteaarray` type.
148 OID of the `chararray` type.
150 OID of the `namearray` type.
152 OID of the `int2array` type.
154 OID of the `int2vectorarray` type.
156 OID of the `int4array` type.
158 OID of the `regprocarray` type.
160 OID of the `textarray` type.
162 OID of the `oidarray` type.
164 OID of the `tidarray` type.
166 OID of the `xidarray` type.
168 OID of the `cidarray` type.
170 OID of the `oidvectorarray` type.
172 OID of the `bpchararray` type.
174 OID of the `varchararray` type.
176 OID of the `int8array` type.
178 OID of the `pointarray` type.
180 OID of the `lsegarray` type.
182 OID of the `patharray` type.
184 OID of the `boxarray` type.
186 OID of the `float4array` type.
188 OID of the `float8array` type.
190 OID of the `polygonarray` type.
192 OID of the `aclitem` type.
194 OID of the `aclitemarray` type.
196 OID of the `macaddrarray` type.
198 OID of the `inetarray` type.
200 OID of the `cidrarray` type.
202 OID of the `cstringarray` type.
204 OID of the `bpchar` type.
206 OID of the `varchar` type.
208 OID of the `date` type.
210 OID of the `time` type.
212 OID of the `timestamp` type.
214 OID of the `timestamparray` type.
216 OID of the `datearray` type.
218 OID of the `timearray` type.
220 OID of the `timestamptz` type.
222 OID of the `timestamptzarray` type.
224 OID of the `interval` type.
226 OID of the `intervalarray` type.
228 OID of the `numericarray` type.
230 OID of the `timetz` type.
232 OID of the `timetzarray` type.
234 OID of the `bit` type.
236 OID of the `bitarray` type.
238 OID of the `varbit` type.
240 OID of the `varbitarray` type.
242 OID of the `numeric` type.
244 OID of the `refcursor` type.
246 OID of the `refcursorarray` type.
248 OID of the `regprocedure` type.
250 OID of the `regoper` type.
252 OID of the `regoperator` type.
254 OID of the `regclass` type.
256 OID of the `regtype` type.
258 OID of the `regprocedurearray` type.
260 OID of the `regoperarray` type.
262 OID of the `regoperatorarray` type.
264 OID of the `regclassarray` type.
266 OID of the `regtypearray` type.
268 OID of the `uuid` type.
270 OID of the `uuidarray` type.
272 OID of the `tsvector` type.
274 OID of the `gtsvector` type.
276 OID of the `tsquery` type.
278 OID of the `regconfig` type.
280 OID of the `regdictionary` type.
282 OID of the `tsvectorarray` type.
284 OID of the `gtsvectorarray` type.
286 OID of the `tsqueryarray` type.
288 OID of the `regconfigarray` type.
290 OID of the `regdictionaryarray` type.
292 OID of the `txid_snapshot` type.
294 OID of the `txid_snapshotarray` type.
296 OID of the `int4range` type.
298 OID of the `int4rangearray` type.
300 OID of the `numrange` type.
302 OID of the `numrangearray` type.
304 OID of the `tsrange` type.
306 OID of the `tsrangearray` type.
308 OID of the `tstzrange` type.
310 OID of the `tstzrangearray` type.
312 OID of the `daterange` type.
314 OID of the `daterangearray` type.
316 OID of the `int8range` type.
318 OID of the `int8rangearray` type.
320 OID of the `record` type.
322 OID of the `cstring` type.
324 OID of the `any` type.
326 OID of the `anyarray` type.
328 OID of the `void` type.
330 OID of the `trigger` type.
332 OID of the `event_trigger` type.
334 OID of the `language_handler` type.
336 OID of the `internal` type.
338 OID of the `opaque` type.
340 OID of the `anyelement` type.
342 OID of the `anynonarray` type.
344 OID of the `anyenum` type.
346 OID of the `fdw_handler` type.
348 OID of the `anyrange` type.
352 * public (readonly) pq\Connection $connection
353 The connection which was used to obtain type information.