From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Luiz E(dot) P(dot) Fernandes" <lepfer(at)uol(dot)com(dot)br> |
Cc: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | Re: Seconds precision in timestamp columns |
Date: | 2021-07-17 14:04:11 |
Message-ID: | 56084.1626530651@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
"Luiz E. P. Fernandes" <lepfer(at)uol(dot)com(dot)br> writes:
> In the dvdrental example database, there is a column named
> 'payment_date' on the 'payment' table and columns 'rental_date' and
> 'return_date' on the 'rental' table. These columns appear on the
> information_schema.columns view with identical specifications: datatype
> = 'timestamp without timezone', datetime_precision = 6. However, a
> select on table 'payment' presents column 'payment_date' with 6
> fractional digits, while a select on table 'rental' presents columns
> 'rental_date' and 'return_date' without fractional digits.
Presumably this is just an artifact of the example data. timestamptz_out
suppresses trailing fractional zeroes, regardless of the column's nominal
precision. So there's no reason to think that one column is being treated
differently from the others.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | trn nrjn | 2021-11-23 07:09:50 | PostgreSQL XA resource manager for C/C++ apps |
Previous Message | Luiz E. P. Fernandes | 2021-07-16 19:03:53 | Seconds precision in timestamp columns |