Re: BUG #18230: Redundant comparison of a local variable 'tzp' address with a NULL value at dt_common.c
В списке pgsql-bugs по дате отправления:
| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера