Timeline for Unsigned Int datatypes
Current License: CC BY-SA 4.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 19, 2021 at 23:21 | comment | added | Seva Alekseyev | It's up to the OP how to handle that. Some algorithms depend on silent overflow. | |
Feb 19, 2021 at 23:18 | comment | added | Dai |
Doing AND 0xFFFFFFFF would just sweep-under-the-rug any overflow issues - I feel a CHECK CONSTRAINT to set a bounds on the range would be better as that would throw an error on overflow rather than hiding it. Another problem with using a wider type (e.g. bigint instead of a hypothetical utin32 ) is that you end-up wasting 4 bytes per column per record, which could add-up. In a recent application I built I ended-up storing uint64 values as signed bigint values and transforming values (and query parameters) at the last minute - which added more complexity.
|
|
Feb 15, 2019 at 16:05 | review | First posts | |||
Feb 15, 2019 at 18:06 | |||||
Feb 15, 2019 at 16:04 | history | answered | Seva Alekseyev | CC BY-SA 4.0 |