Re: Remove fcinfo from statistics update internal functions

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
Cc: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Remove fcinfo from statistics update internal functions
Date: 2026-09-03 00:40:23
Message-ID: apjB92dWvZkjlBsu@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 03, 2026 at 08:21:49AM +0900, Michael Paquier wrote:
> So, isnull=true is not something that we can enforce using a C
> initializer of the type {0}. However, it is something that we can
> enforce with an initializer macro, as in the lines of (same for atts
> and rels) in statistics.h:
> #define RELATION_STATS_VALUES_NULL \
> { \
> .version = {(Datum) 0, true}, \
> .relpages = {(Datum) 0, true}, \
> [...]
> }
>
> And then use this initializer for the defined structures, for both
> the restore *and* the import code.

In short just the attached, minus the fields that do not need to be
set anymore.
--
Michael

Attachment Content-Type Size
0001-Add-safer-initializers-for-relation-and-attribute-st.patch text/plain 6.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2026-09-03 00:42:43 Re: SUM(int2)/SUM(int4) do not detect overflow of the int8 accumulator
Previous Message Michael Paquier 2026-09-03 00:33:33 Re: Stabilize 026_overwrite_contrecord test