Re: BUG #18230: Redundant comparison of a local variable 'tzp' address with a NULL value at dt_common.c

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #18230: Redundant comparison of a local variable 'tzp' address with a NULL value at dt_common.c
Дата
Msg-id 1196403.1701921904@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #18230: Redundant comparison of a local variable 'tzp' address with a NULL value at dt_common.c  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-bugs
Michael Paquier <michael@paquier.xyz> writes:
> *tzp could be given to DecodeTimezone() and manipulated inside it, but
> you are right that we don't use it at all in the DecodeDateTime()
> path.  Other callers of DecodeTimezone() may depend on the changes
> done inside it, though.  Perhaps DecodeTimezone() should be extended
> so as it can accept a NULL value and use that in DecodeDateTime(),
> eliminating the need for *tzp entirely?

TBH, I think our best path here is to leave well enough alone.
The main impact of the proposed changes is to make ecpg's copy
of the datetime parsing code diverge even further from the
backend's copy.  I don't think that these changes buy anything
meaningful, and what they will do is make it harder to reunify
that logic, which somebody will probably try to do someday.

(The recent changes to support non-error-throwing returns from
input functions probably made that task notably easier, BTW.)

            regards, tom lane



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

Предыдущее
От: Andrei Lepikhov
Дата:
Сообщение: Re: BUG #18187: Unexpected error: "variable not found in subplan target lists" triggered by JOIN
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #18231: String conversion function is adding special characters in Postgres 15