On 2020-03-17 16:04, Robert Haas wrote:
>>> (It doesn't seem like we're all that careful about whether we're using
>>> int, which is signed, or Index, which is unsigned, and we might want
>>> to go around and tighten that up.
>>
>> Yeah, I'd be leery of trying to use that last bit. The cost-benefit
>> ratio on that is *definitely* not attractive.
>
> That seems clear, but trying to be consistent about the types we use
> for things is a good idea on general principle, even if we have no
> intention of doing anything that really relies on it any time in the
> forseeable future. If nothing else, it might avoid some compiler
> warnings.
You could make INNER_VAR -1 and so on. Then it would probably break
quite clearly if it's not signedness clean.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services