I'm using PostgreSQL 9.3 and looking for a way to incorporate TIMESTAMPTZ as true JavaScript date objects.
I understand that JavaScript does not offer Date literal notation, so I was thinking
'{ "key" : new Date(datevalue) }'::JSON
would do the trick.
The problem is that I get the error: Token "new" is invalid.
Is it possible for me to update the Postgres JSON parser?
Maybe there is some other way I can get a bit more datatype consistency as I pass data between the front and back end... any thoughts?