pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: eugeny@zhuzhnev.com, pgsql-bugs <pgsql-bugs@lists.postgresql.org>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Subject: Re: BUG #17866: behavior does not match documentation
Date: Thu, 23 Mar 2023 17:54:50 -0400
Message-ID: <2053300.1679608490@sss.pgh.pa.us> (raw)
In-Reply-To: <EE5080A8-E4B2-413F-A604-58B1BFAD8942@yesql.se>
References: <17866-18eb70095b1594e2@postgresql.org>
	<1944674.1679596295@sss.pgh.pa.us>
	<EE5080A8-E4B2-413F-A604-58B1BFAD8942@yesql.se>

Daniel Gustafsson <daniel@yesql.se> writes:
> On 23 Mar 2023, at 19:31, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I wonder if we should rethink that and have these operations strip
>> insignificant trailing zeroes.

> Any app relying on insignificant trailing zeroes seems broken, but the inverse
> can be argued as well.  It's however quite easy to argue for the stripped
> output being more readable though.

It's more readable for sure, and it duplicates what you got in pre-v14
versions, at least textually.  I'm not sure I'd propose back-patching
this, but it feels like a good idea for HEAD.

The argument for the current behavior probably goes like "we're exposing
the actual precision of the value".  But I don't believe that we are;
we're exposing the maximum possible precision.  We have no way to know
how precise the original timestamp or interval input was.  So I don't
think there's much basis for claiming that the result is good to six
fractional digits.

			regards, tom lane





view thread (7+ messages)  latest in thread

Message-ID: <2053300.1679608490@sss.pgh.pa.us>
Permalink:  ../2053300.1679608490@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2053300.1679608490@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, daniel@yesql.se, pgsql-bugs@lists.postgresql.org, peter.eisentraut@enterprisedb.com
  Subject: Re: BUG #17866: behavior does not match documentation
  In-Reply-To: <2053300.1679608490@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox