pgsql: Refactor timestamp2timestamptz_opt_error()

Поиск
Список
Период
Сортировка
От Alexander Korotkov
Тема pgsql: Refactor timestamp2timestamptz_opt_error()
Дата
Msg-id E1iMe1i-00082X-5G@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Refactor timestamp2timestamptz_opt_error()

While casting from timestamp to timestamptz we do timestamp2tm() then
tm2timestamp().  This commit eliminates call to tm2timestamp().  Instead, it
directly applies timezone offset to the original timestamp value.  That makes
upcoming datetime overflow handling in jsonpath easier.  That should also save
us some CPU cycles.

Discussion: https://postgr.es/m/CAPpHfdvRPRh_mTGar5WmDeRZ%3DU5dOXHdxspYYD%3D76m3knNGjXA%40mail.gmail.com
Author: Alexander Korotkov
Reviewed-by: Tom Lane

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a6888fde7f0dbe865559b31ba2ce01ac1150debe

Modified Files
--------------
src/backend/utils/adt/timestamp.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Deal with yet another issue related to "Norwegian (Bokmål)" loca
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: pgsql: Fix parsing of integer values for connection parameters inlibpq