Re: 8.3 vs HEAD difference in Interval output?

Поиск
Список
Период
Сортировка
Искать
От
Ron Mayer
Тема
Re: 8.3 vs HEAD difference in Interval output?
Дата
Msg-id
48EE7637.6060101@cheapcomplexdevices.com
Ответ на
Список
Дерево обсуждения
Proposed patch: make SQL interval-literal syntax work per spec Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposed patch: make SQL interval-literal syntax work per spec "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: Proposed patch: make SQL interval-literal syntax work per spec Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposed patch: make SQL interval-literal syntax work per spec Bruce Momjian <bruce@momjian.us>
Re: Proposed patch: make SQL interval-literal syntax work per spec Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposed patch: make SQL interval-literal syntax work per spec Bruce Momjian <bruce@momjian.us>
Re: Proposed patch: make SQL interval-literal syntax work per spec Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Proposed patch: make SQL interval-literal syntax work per spec Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposed patch: make SQL interval-literal syntax work per spec Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Proposed patch: make SQL interval-literal syntax work per spec Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposed patch: make SQL interval-literal syntax work per spec Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Proposed patch: make SQL interval-literal syntax work per spec Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposed patch: make SQL interval-literal syntax work per spec Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Proposed patch: make SQL interval-literal syntax work per spec Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Proposed patch: make SQL interval-literal syntax work per spec Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Proposed patch: make SQL interval-literal syntax work per spec Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposed patch: make SQL interval-literal syntax work per spec Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Proposed patch: make SQL interval-literal syntax work per spec Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Proposed patch: make SQL interval-literal syntax work per spec Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Proposed patch: make SQL interval-literal syntax work per spec Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposed patch: make SQL interval-literal syntax work per spec Ron Mayer <rm_pg@cheapcomplexdevices.com>
8.3 vs HEAD difference in Interval output? R Mayer <pg_cert@cheapcomplexdevices.com>
8.3 vs HEAD difference in Interval output? Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: 8.3 vs HEAD difference in Interval output? Tom Lane <tgl@sss.pgh.pa.us>
Re: 8.3 vs HEAD difference in Interval output? "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: 8.3 vs HEAD difference in Interval output? "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: 8.3 vs HEAD difference in Interval output? Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: 8.3 vs HEAD difference in Interval output? Kenneth Marshall <ktm@rice.edu>
Re: 8.3 vs HEAD difference in Interval output? Tom Lane <tgl@sss.pgh.pa.us>
Re: 8.3 vs HEAD difference in Interval output? Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: 8.3 vs HEAD difference in Interval output? Tom Lane <tgl@sss.pgh.pa.us>
Re: 8.3 vs HEAD difference in Interval output? Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: 8.3 vs HEAD difference in Interval output? "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: 8.3 vs HEAD difference in Interval output? Kenneth Marshall <ktm@rice.edu>
Re: 8.3 vs HEAD difference in Interval output? Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: 8.3 vs HEAD difference in Interval output? Tom Lane <tgl@sss.pgh.pa.us>
Re: 8.3 vs HEAD difference in Interval output? Ron Mayer <rm_pg@cheapcomplexdevices.com>
Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle "Brendan Jurd" <direvus@gmail.com>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Tom Lane <tgl@sss.pgh.pa.us>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for SQL-Standard Interval output and decouplingDateStyle from IntervalStyle "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle "Brendan Jurd" <direvus@gmail.com>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Tom Lane <tgl@sss.pgh.pa.us>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Tom Lane <tgl@sss.pgh.pa.us>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Tom Lane <tgl@sss.pgh.pa.us>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Tom Lane <tgl@sss.pgh.pa.us>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Tom Lane <tgl@sss.pgh.pa.us>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Tom Lane <tgl@sss.pgh.pa.us>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Tom Lane <tgl@sss.pgh.pa.us>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Tom Lane <tgl@sss.pgh.pa.us>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Tom Lane <tgl@sss.pgh.pa.us>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Tom Lane <tgl@sss.pgh.pa.us>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Chuck McDevitt <cmcdevitt@greenplum.com>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Tom Lane <tgl@sss.pgh.pa.us>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Tom Lane <tgl@sss.pgh.pa.us>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Tom Lane <tgl@sss.pgh.pa.us>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle "Robert Haas" <robertmhaas@gmail.com>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle Ron Mayer <rm_pg@cheapcomplexdevices.com>
Patch for ISO-8601-Interval Input and output. Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for ISO-8601-Interval Input and output. "Brendan Jurd" <direvus@gmail.com>
Re: Patch for ISO-8601-Interval Input and output. Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for ISO-8601-Interval Input and output. "Brendan Jurd" <direvus@gmail.com>
Re: Patch for ISO-8601-Interval Input and output. Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for ISO-8601-Interval Input and output. Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for ISO-8601-Interval Input and output. "Brendan Jurd" <direvus@gmail.com>
Re: Patch for ISO-8601-Interval Input and output. Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for ISO-8601-Interval Input and output. "Brendan Jurd" <direvus@gmail.com>
Re: Patch for ISO-8601-Interval Input and output. Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for ISO-8601-Interval Input and output. Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for ISO-8601-Interval Input and output. "Brendan Jurd" <direvus@gmail.com>
Re: Patch for ISO-8601-Interval Input and output. R Mayer <pg_cert@cheapcomplexdevices.com>
Re: Patch for ISO-8601-Interval Input and output. "Brendan Jurd" <direvus@gmail.com>
Re: Patch for ISO-8601-Interval Input and output. Tom Lane <tgl@sss.pgh.pa.us>
Re: Patch for ISO-8601-Interval Input and output. Tom Lane <tgl@sss.pgh.pa.us>
Interval code refactoring patch (Was: Re: Patch for ISO-8601-Interval Input and output.) Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for ISO-8601-Interval Input and output. Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposed patch: make SQL interval-literal syntaxwork per spec "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: Proposed patch: make SQL interval-literal syntax work per spec Josh Berkus <josh@agliodbs.com>
Re: Proposed patch: make SQL interval-literal syntax work per spec Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Proposed patch: make SQL interval-literal syntax work per spec Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposed patch: make SQL interval-literal syntax work per spec Ron Mayer <rm_pg@cheapcomplexdevices.com>
Patch for SQL-standard negative valued year-month literals Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for SQL-standard negative valued year-month literals Tom Lane <tgl@sss.pgh.pa.us>
Re: Patch for SQL-standard negative valued year-month literals Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for SQL-standard negative valued year-month literals Tom Lane <tgl@sss.pgh.pa.us>
Re: Patch for SQL-standard negative valued year-month literals "Stephen R. van den Berg" <srb@cuci.nl>
Re: Patch for SQL-standard negative valued year-month literals Tom Lane <tgl@sss.pgh.pa.us>
Re: Patch for SQL-standard negative valued year-month literals "Stephen R. van den Berg" <srb@cuci.nl>
Re: Patch for SQL-standard negative valued year-month literals Ron Mayer <rm_pg@cheapcomplexdevices.com>
Re: Patch for SQL-standard negative valued year-month literals Ron Mayer <rm_pg@cheapcomplexdevices.com>
Tom Lane wrote:
> In the integer-timestamp world we know that the number is exact in
> microseconds.  We clearly ought to be prepared to display up to six
> fractional digits, but suppressing trailing zeroes in that seems
> appropriate.

Great.

> We could try to do the same in the float case, but I'm a bit worried
> about finding ourselves showing "1234567.799999" where it should be
> "1234567.8".

If I understand the code right fsec should mostly be values
between -1 and 1 anyway, because even in the floating point
case seconds are carried in the tm->tm_sec part.
It looks to me that a double should be plenty to do
microseconds so long as we don't put big numbers into fsec.  printf("%.99f\n",59.111111111111111111);  59.11111111111111426907882 ...

Anyway - I'll try showing up-to-6-digits in both cases and
seeing if I can find a test case that breaks.

I guess this rounding trickiness with rounding explains some of
the bizarre code like this too:   #if 0/* chop off trailing one to cope with interval rounding */if (strcmp(str + len - 4, "0001") == 0){	len -= 4;	*(str + len) = '\0';}   #endif

В списке pgsql-hackers по дате отправления
От: Ryan Bradetich
Дата:
От: Tom Lane
Дата:
FAQ