Re: Problem migrating dump to latest CVS snapshot.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: lockhart(at)fourpalms(dot)org
Cc: Gunnar R|nning <gunnar(at)candleweb(dot)no>, Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Problem migrating dump to latest CVS snapshot.
Date: 2001-03-23 03:27:20
Message-ID: 16080.985318040@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu> writes:
>> I've suggested before that timestamp output should round the timestamp
>> value to two fractional digits *before* breaking it down into year/
>> month/etc. Seems like this is a perfect example of the necessity
>> for that. Thomas, what say you?

> Well, that is a good idea to solve the "hidden digits problem",
> introducing instead a new "lost digits feature".

We already have the "lost digits feature", since you cannot get
timestamp_out to display anything after the second digit. Now,
if you want to improve on that ...

> But I've been hoping to
> hear a suggestion on how to allow a variable number of digits, without
> cluttering things up with output values ending up with a bunch of 9's at
> the end.

Well, we could print the seconds part with, say, %.6f format and then
manually delete trailing zeroes (and the trailing dot if we find all the
fractional digits are zero, which would be a nice improvement anyway).
I'd still think it a good idea to round to the intended number of digits
before we break down the date, however.

The real question here is how far away from the Epoch do you wish to
produce reasonable display of fractional seconds? We have 6-digit
accuracy out to around 200 years before and after Y2K, which is probably
far enough, though maybe we should make it 5 digits to allow some
more margin for error.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-03-23 03:29:27 Re: psql slow connection
Previous Message datactrl 2001-03-23 03:16:37 psql slow connection

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Knox 2001-03-23 03:49:02 Re: Call for platforms
Previous Message Thomas Lockhart 2001-03-23 03:05:30 Re: Problem migrating dump to latest CVS snapshot.