I am working wih a PostgreSQL DB that stores time-series data. The data is stored using "timestamp with time zone" type and the output is ISO format (postgresql default). The data source is a closed-source software that creates tables with "timestamp with time zone" data type.
The precision of the timestamp is till 6 digits (microseconds) according to Postgres documentation. So, my time-series are recorded every second and I see milliseconds in the output.
e.g. 2012-06-25 15:46:23.001
The software that plots the time-series data goes crazy with the milliseconds but I can't modify the data source software to use timestamp(0) when it creates the tables.
A colleague of mine programmed a function that queries the whole database to alter the timestamp data type to "timestamp(0) with time zone" in every table. It works well but it's a manual action that has to be done after every new table is created. We would like to avoid the use of the function.
Is it possible to tell to postgresql to create timestamp(0) timestamp data types instead of the default timestamp(6) by editing postgresql.conf?