brianc/node-postgres — pull request #209 by brianc (2013-06-03 17:15:23+00:00)
Title: Feature request: access field names and types even when NO rows are returned

A common trick to get information about the structure of a query result is to run the query with a LIMIT 0 thus only getting the field names and types.

This trick seems to be impossible to do with the node-postgresql module because the only place where field names are available is within a result row, so no rows means no such info.

I hope I'm missing something. If not, this would be a really useful addition.
I've been thinking the information could be passed as part of the .end() event, with information being filed names and data types.