Re: Re: [COMMITTERS] pgsql: Add column storage type to psql \d+ display.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Re: [COMMITTERS] pgsql: Add column storage type to psql \d+ display.
Дата
Msg-id 9729.1216354977@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Re: [COMMITTERS] pgsql: Add column storage type to psql \d+ display.  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Bruce Momjian wrote:
>> I don't see that warning with my compiler so I have no way of testing
>> this, but I do see this line pretty high in the function:
>> tableinfo.relkind = *(PQgetvalue(res, 0, 1));

> But it's before the first "goto error_return", after which it is checked.

Ah.  That code is indeed broken, or at least risky in the extreme.  What
the cleanup code ought to be checking is just whether or not the arrays
have gotten allocated yet.  Checking a condition that should later lead
to the array getting allocated is just asking for trouble --- even if
there's not a "goto error_return" in between today, someday someone will
insert one.

Patch applied ...
        regards, tom lane


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

Предыдущее
От: "Gurjeet Singh"
Дата:
Сообщение: Re: Load spikes on 8.1.11
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Load spikes on 8.1.11