From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Richard Guo <guofenglinux(at)gmail(dot)com>, Alexandra Wang <alexandra(dot)wang(dot)oss(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "bruce(at)momjian(dot)us" <bruce(at)momjian(dot)us>, lepihov(at)gmail(dot)com |
Subject: | Re: plan shape work |
Date: | 2025-09-16 15:27:04 |
Message-ID: | CA+TgmoYjYtQYvEb1UyVVi8z4oX6mdR5H3GynfeMPtA7fj2N1TA@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
CI is unhappy with v6 because:
[14:37:37.742] In function ‘show_result_replacement_info’,
[14:37:37.742] inlined from ‘ExplainNode’ at explain.c:2240:4:
[14:37:37.742] explain.c:4849:33: error: ‘replacement_type’ may be
used uninitialized [-Werror=maybe-uninitialized]
[14:37:37.742] 4849 | char *s = psprintf("%s on
%s", replacement_type, buf.data);
[14:37:37.742] |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[14:37:37.742] explain.c: In function ‘ExplainNode’:
[14:37:37.742] explain.c:4769:21: note: ‘replacement_type’ was declared here
[14:37:37.742] 4769 | char *replacement_type;
[14:37:37.742] | ^~~~~~~~~~~~~~~~
So apparently an "enum" over every value of the switch is not good
enough for the value to be assigned.
I'm inclined to change the code like this to fix it:
char *replacement_type = "???";
...in the hopes of still producing a warning here if somebody adds
another label to the enum.
--
Robert Haas
EDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2025-09-16 15:33:10 | Re: Clarification on DROP OWNED BY command in PG18 |
Previous Message | Andres Freund | 2025-09-16 15:25:14 | Re: Incorrect result of bitmap heap scan. |