pgsql: Tighten handling of "ago" in interval values

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема pgsql: Tighten handling of "ago" in interval values
Дата
Msg-id E1qaUCv-001I6I-49@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Tighten handling of "ago" in interval values

This commit Restrict the unit "ago" to only appear at the end of the
interval.  According to the documentation, a direction can only be
defined at the end of an interval, but it was possible to define it in
the middle of the string or define it multiple times.

In spirit, this is similar to the error handling improvements done in
5b3c5953553b or bcc704b524904.

Author: Joseph Koshakow
Reviewed-by: Jacob Champion, Gurjeet Singh, Reid Thompson
Discussion: https://postgr.es/m/CAAvxfHd-yNO+XYnUxL=GaNZ1n+eE0V-oE0+-cC1jdjdU0KS3iw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/165d581f146b09543b832513ee00fead132ba6b1

Modified Files
--------------
src/backend/utils/adt/datetime.c       | 7 +++++++
src/test/regress/expected/interval.out | 9 +++++++++
src/test/regress/sql/interval.sql      | 4 ++++
3 files changed, 20 insertions(+)


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Format list of catalog files in makefile vertically
Следующее
От: Michael Paquier
Дата:
Сообщение: pgsql: Tighten unit parsing in internal values