For putf or getf, the conversion specifier is a % followed by a two character encoding. The first character indicates the type class while the second character identifies the data type within that class. The byteaptr and textptr are really bytea and text. The "ptr" extension indicates that only a pointer assignment should occur rather than a copy. Most of the below types are already implemented. Some are still being worked on. Character types: cc "char" ct text, varchar, char cT textptr Boolean types: bb bool Numeric Types: n2 int2 n4 int4 n8 int8 nf float4 nd float8 nn numeric Bytea types: Bb bytea BB byteaptr Geometric types: gp point gl lseg gb box gc circle gP path gy polygon Network addrress types: Ni inet/cidr Nm macaddr Monetary types: mm money Array types: aa array Date and time types: dt time, timetz dd date dT timestamp, timestamptz di interval Object identifier types: oi oid PQputf use: SPEC PGTYPE ARGTYPE BYTES NOTES cc "char" int 1 ct text char* strlen+1 NUL-terminated string that gets copied internally cT textptr char* strlen+1 NUL-terminated string that does not get copied bb bool int 1 n2 int2 int 2 n4 int4 int 4 n8 int8 long long 8 nf float4 double 4 nd float8 double 8 nn numeric -- -- Bb bytea size_t, char* -- Specify byte len of the bytea, copys internally BB byteaptr size_t, char* -- Specify byte len of the bytea, no copy gp point PGpoint* -- gl lseg PGlseg* -- gb box PGbox* -- gc circle PGcircle* -- gP path PGpath* -- gy polygon PGpolygon* -- Ni inet/cidr PGinet* -- Nm macaddr PGmacaddr* -- mm money double 4 or 8 aa array -- -- dt time -- -- dd date -- -- dT timestamp -- -- di interval -- -- oi oid uint 4 PQgetf use: NOTE: All get arguments must include the field_num followed by the below ARGTYPE. size_t bytea_len; char **bytea; int field_num = 0; PQgetf(res, tup_num, "%BB", field_num, &bytea_len, &bytea); SPEC PGTYPE ARGTYPE BYTES NOTES cc "char" int* 1 ct text size_t, char* -- Specify char buffer length followed by a buffer Copies to provided buffer. cT textptr char** -- Provides a direct pointer, no copying bb bool int* 1 n2 int2 int* 2 n4 int4 int* 4 n8 int8 long long* 8 nf float4 double* 4 nd float8 double* 8 nn numeric -- -- Bb bytea size_t*, char* -- Specify char buffer length followed by a buffer. Copies to provided buffer and assigns provided size_t* to the bytea's length BB byteaptr size_t*,char** -- Provides a direct pointer to bytea, no copying. size_t* is assigned to bytea's length gp point PGpoint* -- gl lseg PGlseg* -- gb box PGbox* -- gc circle PGcircle* -- gP path PGpath* -- gy polygon PGpolygon* -- Ni inet/cidr PGinet* -- Nm macaddr PGmacaddr* -- mm money double 4 or 8 aa array -- -- dt time -- -- dd date -- -- dT timestamp -- -- di interval -- -- oi oid uint 4