Make PostgreSQL timestamps display milliseconds even if zero
postgresql
Solution
Doesn't look like there is any such option.
What you can do instead is use `to_char`:
SELECT to_char(TIMESTAMP '2013-01-01 12:13:14.001', 'YYYY-MM-DD HH:MI:SS:MS');
Problem
I have a postgres DB with a "timestamp" column of the type "timestamp without time zone". If the following timestamp ("2013-01-01 12:13:14.000") is inserted into the DB, it is displayed (using PgAdmin or psql from command line) as "2013-01-01 12:13:14". Is there an optional switch or setting that can be set in the DB somewhere that will allow the DB to display the full extent of the precision it can handle? For example I would like for it to display "2013-01-01 12:13:14.000" even if the milliseconds are indeed zero. Of course, this is merely for quick viewing on the fly. Your help in this regard is highly appreciated. :)