Re: Uninitialized scalar variable (UNINIT) (src/backend/statistics/extended_stats.c)

Поиск
Список
Период
Сортировка
От Ranier Vilela
Тема Re: Uninitialized scalar variable (UNINIT) (src/backend/statistics/extended_stats.c)
Дата
Msg-id CAEudQAoBNZYKZgk3JBPPJAWo5z7O1EZ_wdZjYuTfAY618G=X+g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Uninitialized scalar variable (UNINIT) (src/backend/statistics/extended_stats.c)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Uninitialized scalar variable (UNINIT) (src/backend/statistics/extended_stats.c)
Re: Uninitialized scalar variable (UNINIT) (src/backend/statistics/extended_stats.c)
Список pgsql-hackers


Em seg., 12 de abr. de 2021 às 03:04, Tom Lane <tgl@sss.pgh.pa.us> escreveu:
Michael Paquier <michael@paquier.xyz> writes:
> On Sun, Apr 11, 2021 at 07:42:20PM -0300, Ranier Vilela wrote:
>> Em dom., 11 de abr. de 2021 às 16:25, Justin Pryzby <pryzby@telsasoft.com>
>>> I think it's cleanest to write:
>>> |HeapTupleData tmptup = {0};

> I agree that this would be cleaner.

It would be wrong, though, or at least not have the same effect.
I think that you speak about fill pointers with 0 is not the same as fill pointers with NULL.
 
ItemPointerSetInvalid does not set the target to all-zeroes.
ItemPointerSetInvalid set or not set the target to all-zeroes?


(Regardless of that detail, it's generally best to accomplish
objective X in the same way that existing code does.  Deciding
that you have a better way is often wrong, and even if you
are right, you should then submit a patch to change all the
existing cases.)
I was confused here, does the patch follow the pattern and fix the problem or not?

regards,
Ranier Vilela

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

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: Re: Contribution to PostgreSQL - please give an advice
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Core dump happens when execute sql CREATE VIEW v1(c1) AS (SELECT ('4' COLLATE "C")::INT FROM generate_series(1, 10));