The following bug has been logged on the website: Bug reference: 18890 Logged by: Daniel Elishakov Email address: dan-eli@mail.ru PostgreSQL version: 17.4 Operating system: Ubuntu 20.04 Description: On line 223 there is a check of string 'name' and in this case it is initiallized and then is being checked for null once more with no reason. The code becomes quite buggy.
PG Bug reporting form <noreply@postgresql.org> writes:
> On line 223 there is a check of string 'name' and in this case it is
> initiallized and then is being checked for null once more with no reason.
This code is taken from the upstream tzcode distribution, in which
TZDEFAULT can be NULL. (Or so I assume anyway without having looked.)
I'm disinclined to diverge from their code just to satisfy some static
analyzer complaining about useless code --- any reasonable C compiler
will discard that code, so it's not a problem.
> The code becomes quite buggy.
If there is actually a bug here, I'm not seeing it.
regards, tom lane
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера