pgsql: Fix to_timestamp/to_date's handling of consecutive spaces in for

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix to_timestamp/to_date's handling of consecutive spaces in for
Дата
Msg-id E1W5JrC-0007d4-U5@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix to_timestamp/to_date's handling of consecutive spaces in format string.

When there are consecutive spaces (or other non-format-code characters) in
the format, we should advance over exactly that many characters of input.
The previous coding mistakenly did a "skip whitespace" action between such
characters, possibly allowing more input to be skipped than the user
intended.  We only need to skip whitespace just before an actual field.

This is really a bug fix, but given the minimal number of field complaints
and the risk of breaking applications coded to expect the old behavior,
let's not back-patch it.

Jeevan Chalke

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/9a8f5729b4625ec0468ad5a48296c3e729cf3e65

Modified Files
--------------
src/backend/utils/adt/formatting.c     |   18 +++++---
src/test/regress/expected/horology.out |   75 ++++++++++++++++++++++++++++++++
src/test/regress/sql/horology.sql      |   20 +++++++++
3 files changed, 107 insertions(+), 6 deletions(-)


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

Предыдущее
От: Fujii Masao
Дата:
Сообщение: pgsql: Fix typo in comment.
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Remove pg_stat_statements--1.1.sql.