In Postgres, is it possible to change the default format mask for a timestamp?
right now comes back as
2012-01-03 20:27:53.611489
I
to_char() is used to create a string literal. If you want a different timestamp value, use:
date_trunc('minute', now())
For an input mask you can use:
to_timestamp('2012-01-03 20:27:53.611489', 'YYYY-MM-DD HH24:MI')
Cast to timestamp without time zone by appending ::timestamp.
To my knowledge, there is not setting in PostgreSQL that would trim seconds from timestamp literals by default.