PostgreSQL - PostGIS ST_SetValues - int array cast to double and back
1
vote
1
answer
273
views
I am using
ST_SetValues
with array defined as ARRAY[[9, 9], [9, 9]]::double precision[][]
.
If I store 32bit integer
value in this array can I retrieve this value exactly after casting from double
to integer
?
Or is there some limited precission for integer
part of the double
. I want to store "packed" RGBA into a single 32bit integer
there and "unpack" single color channels after output in my app.
As from documentation, double
should be 64bit, so in my oppinion, this should be possible, but maybe I am missing something.
Asked by Martin Perry
(231 rep)
Nov 6, 2016, 12:53 PM
Last activity: May 20, 2025, 09:01 AM
Last activity: May 20, 2025, 09:01 AM