Re: Missing free_var() at end of accum_sum_final()? - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Missing free_var() at end of accum_sum_final()?
Date
Msg-id dabadcf6-1bcc-c275-56ab-07bd2a93870c@enterprisedb.com
Whole thread Raw
In response to Re: Missing free_var() at end of accum_sum_final()?  ("Joel Jacobson" <joel@compiler.org>)
Responses Re: Missing free_var() at end of accum_sum_final()?  (Dean Rasheed <dean.a.rasheed@gmail.com>)
List pgsql-hackers
On 20.02.23 23:16, Joel Jacobson wrote:
> In the new attached patch, Andres fixed buffer idea has been implemented
> throughout the entire numeric.c code base.

I think the definition of the "preinitialized constants" could be 
adapted to this as well.  For example, instead of

     static const NumericDigit const_one_data[1] = {1};
     static const NumericVar const_one =
     {1, 0, NUMERIC_POS, 0, NULL, (NumericDigit *) const_one_data};

it could be something like

     static const NumericVar const_one =
     {0, 0, NUMERIC_POS, 0, NULL, NULL, 1, {1}};

Or perhaps with designators:

     static const NumericVar const_one =
     {.sign = NUMERIC_POS, .buflen = 1, .fixed_buf = {1}};




pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Make some xlogreader messages more accurate
Next
From: Amit Kapila
Date:
Subject: Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher