Re: [BUGS] surprising to_timestamp behavior

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [BUGS] surprising to_timestamp behavior
Дата
Msg-id 32524.1390244013@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [BUGS] surprising to_timestamp behavior  (Jeevan Chalke <jeevan.chalke@enterprisedb.com>)
Список pgsql-hackers
Jeevan Chalke <jeevan.chalke@enterprisedb.com> writes:
>> I went to review this, and found that there's not actually a patch
>> attached ...

> Attached. Sorry for that.

This looks good to me except for one thing: if the upcoming node is a
DCH_FX action (ie, turn on fx_mode), I don't think we want to skip
whitespace.  The original coding had that bug too, but it was only
exposed if the FX prefix was immediately preceded by whitespace in
the format.

It's a bit hard to think of useful cases where this would make a
difference, because it turns out that from_char_parse_int contains
an internal skip-whitespace action that's applied regardless of FX
mode, so it really only matters for non-integer field types.  I
kinda think that maybe now we should remove that extra skip, or at
least count the skipped whitespace against the field width, but
did not experiment to see what the results would be.

Committed with that change and some cosmetic adjustments.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jaime Casanova
Дата:
Сообщение: Re: Trigger information for auto_explain.
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Trigger information for auto_explain.