brianc/node-postgres — pull request #324 by mkleehammer (2013-04-09 20:14:20+00:00)
Title: Optional support for results as arrays.

Hi,

This commit adds support for a new config attribute `rowtype` which can be set to "array". If done, each row is an array of values instead of a full object. This has had enormous performance benefits for a couple of projects that sent a lot of rows to a client for processing. (The client side also maintained the values as arrays.) It is also much more convenient for working with some graphing libraries such as flot.

Since the field names are not part of the rows when this is enabled, the ones already attached to the result (_fieldNames) were made publicly accessible.

I've been using this for a few weeks, primarily for pages that return multiple query results in one page during initialization (lots of tables and graphs) and seems solid.