I'm using libpq to read array values, and I noticed that sometimes the values are returned in Binary and sometimes - in Text format.
1. Returned in Binary format: int formats[1] = { 1 }; // request binary format
res = PQexec(conn, "SELECT rgField FROM aTable", 1, formats);res = PQexec(conn, "SELECT ARRAY[1,2,3]", 1, formats);
assert(PQfformat(res, 0) == 1); // this fails???