balderdashy/sails-postgresql — pull request #11 by polastre (2013-08-07 21:00:25+00:00)
Title: Add binary datatype support for Postgres BYTEA

Waterline supports binary datatypes, so map them to BYTEA column
types in Postgres. Convert buffers to hex strings (as per the
tradition in node-postgres) starting with \x, which will automatically
be converted back into Buffer objects when read from Postgres by
node-postgres.

See
https://github.com/brianc/node-postgres/issues/184
and
parseByteA of https://github.com/brianc/node-postgres/blob/master/lib/types/textParsers.js