From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Re: [COMMITTERS] pgsql: Add column storage type to psql \d+ display. |
Date: | 2008-07-18 04:22:57 |
Message-ID: | 9729.1216354977@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
Alvaro Herrera <alvherre(at)commandprompt(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | User Nanardon | 2008-07-18 13:32:17 | pgrpm - pgrpm: - apply patch from jbj: make it compatible with rpm5 |
Previous Message | Tom Lane | 2008-07-18 04:20:24 | pgsql: Suppress compiler warning, and not incidentally make the code |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-07-18 04:28:39 | Re: Load spikes on 8.1.11 |
Previous Message | Gurjeet Singh | 2008-07-18 03:57:51 | Re: Load spikes on 8.1.11 |