Hi, On 2024-10-08 18:11:39 +0200, Alvaro Herrera wrote: > Oh and actually, we could change all these variables to be unsigned, > since there's no use for negative inhcounts. The patch doesn't do that; > it'd require changing the subtraction paths to use overflow-protected > ops as well.
Unfortunately we don't really have a way to represent unsigned numbers on the SQL level today. So I'd not go there for now - it's not like this is a real limitation for practical use cases. One case where I'd like unsigned numbers is pg_class.relpages - it's pretty awkward that it "looks" negative for large tables. 16TB isn't that large anymore... Greetings, Andres