[PostGIS] #5983: Potential data corruption in topology.topoelement after upgrade to 3.6.0
PostGIS
trac at osgeo.org
Wed Sep 10 17:45:25 PDT 2025
#5983: Potential data corruption in topology.topoelement after upgrade to 3.6.0
-----------------------+---------------------------
Reporter: packi | Owner: robe
Type: defect | Status: new
Priority: blocker | Milestone: PostGIS 3.6.1
Component: topology | Version: 3.6.x
Resolution: | Keywords:
-----------------------+---------------------------
Comment (by robe):
this behaves correctly, so it must be as a whole it knows it's a int[]
masquerading as a bigint, so at least the data is salvagable:
{{{
SELECT (t::int[])[1], (t::int[])[2] FROM postgis_test;
}}}
yields
{{{
t | t
---+---
1 | 2
(1 row)
}}}
{{{
CREATE TABLE postgis_test2 AS SELECT * FROM postgis_test;
SELECT t[1], t[2] FROM postgis_test2; -- gives garbage
}}}
{{{
t | t
------------+----------------
8589934593 | 94612851813424
(1 row)
}}}
{{{
CREATE TABLE postgis_test3 AS SELECT t::int[]::topoelement FROM
postgis_test;
SELECT t[1], t[2] FROM postgis_test3; -- fixes it
}}}
{{{
t | t
---+---
1 | 2
(1 row)
}}}
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5983#comment:6>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list