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

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [COMMITTERS] pgsql: Add column storage type to psql \d+ display.
Дата
Msg-id 200807180220.m6I2KPl19471@momjian.us
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql: Add column storage type to psql \d+ display.  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: Re: [COMMITTERS] pgsql: Add column storage type to psql \d+ display.  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
Alvaro Herrera wrote:
> Bruce Momjian wrote:
> > Log Message:
> > -----------
> > Add column storage type to psql \d+ display.
> 
> I think this patch has caused this new warning in psql:
> 
> /pgsql//source/00head/src/bin/psql/describe.c: In function ?describeOneTableDetails?:
> /pgsql//source/00head/src/bin/psql/describe.c:832: warning: ?tableinfo.relkind? may be used uninitialized in this
function

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));

Do you have any idea how relkind could be accessed before this
assignment?  The line number is it complaining about is the definition
of relkind in the structure, not any reference to the variable.

The only crazy idea I have is that the variable name appears in a string
above the assignment:
      "SELECT relhasindex, relkind, relchecks, reltriggers, relhasrules, "

And relkind is the only column that matches a structure member.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


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

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: Re: [PATCHES] WITH RECUSIVE patches 0717
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: Add column storage type to psql \d+ display.