Re: Problem migrating dump to latest CVS snapshot.
От | Tom Lane |
---|---|
Тема | Re: Problem migrating dump to latest CVS snapshot. |
Дата | |
Msg-id | 16080.985318040@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Problem migrating dump to latest CVS snapshot. (Thomas Lockhart <lockhart@alumni.caltech.edu>) |
Список | pgsql-hackers |
Thomas Lockhart <lockhart@alumni.caltech.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
В списке pgsql-hackers по дате отправления: