| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
| Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: More const-marking cleanup |
| Date: | 2025-12-05 20:52:40 |
| Message-ID: | 1782944.1764967960@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
I wrote:
> Ah. Your script didn't notice the need for const'ification of
> additional variables in map_locale() :-(. I fixed that and
> pushed everything except the ecpg/preproc/variable.c changes,
> which I'm not too comfortable about yet. (The code coverage
> report shows that large chunks of those functions are untested,
> so I wonder if they worked before let alone after.)
I was right to be suspicious about variable.c: I'd misunderstood
what was happening in find_struct_member(), with the consequence
that I broke some cases that were not being tested. Here's v2,
with that repaired, more commentary, and more test cases.
Adding these comments feels a bit like putting lipstick on a pig.
find_variable and its subroutines are an inelegant, duplicative
mess that fails to handle cases it easily could handle if it were
rewritten. But I've put enough brain cells into this already,
and also it appears that there are restrictions elsewhere in ecpg
that'd have to be lifted before it'd make a difference.
regards, tom lane
| Attachment | Content-Type | Size |
|---|---|---|
| v2-fix-missing-const-markers.patch | text/x-diff | 28.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Pogrebnoi | 2025-12-05 21:23:13 | Re: Popcount optimization for the slow-path lookups |
| Previous Message | Robert Haas | 2025-12-05 20:48:32 | Re: [PATCH] Allow complex data for GUC extra. |