Re: [HACKERS] Constifying numeric.c's local vars

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org,Mark Dilger <hornschnorter(at)gmail(dot)com>,Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Constifying numeric.c's local vars
Date: 2018-02-21 17:11:03
Message-ID: 69D966CB-83A7-46D3-BC8A-5B3A1A6B9ABF@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On February 21, 2018 8:49:51 AM PST, Mark Dilger <hornschnorter(at)gmail(dot)com> wrote:
>
>The idea that set_var_from_var might be called on const_zero (or
>const_one,
>etc.) is not hypothetical. It is being done in numeric.c.
>
>If this is safe, somebody needs to be a lot clearer about why that is
>so. There
>are no comments explaining it in the file, and the conversation in this
>thread
>never got into any details about it either.

Just getting started for the day, no coffee yet. But, uh, what you're appear to be saying is that we have code modifying the digits of the zero value? That's seems unlikely.

Andres
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Dilger 2018-02-21 17:12:51 Re: [HACKERS] Constifying numeric.c's local vars
Previous Message Robert Haas 2018-02-21 17:10:41 Re: missing toast table for pg_policy