[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    [postgis-users] Uniqueness constraint on geometry columns
From:       David Jantzen <djantzen () avenace ! com>
Date:       2015-06-24 20:13:16
Message-ID: CACOiXoh4K0QYghbn6M94Owkr=7xUmgRRcQL-XB0UiTH7e9dauA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hello,

I've encountered a violation of a uniqueness constraint that is surprising,
and I'm hoping for an explanation. Below are repro steps:

create table duplicate_points (the_geom geometry(PointZM, 4326));
create unique index on duplicate_points (the_geom);
insert into duplicate_points (the_geom)
values
('01010000E0E610000019FF3EE3C2955EC068942EFD4BCA474000000000000000000000000000000000') \
,('01010000E0E610000087E2C8E2C2955EC01BDC94FA4BCA474000000000000000000000000000000000');


If I cast the point column to text then the uniqueness constraint works as
expected:

create unique index on duplicate_points (cast(the_geom as text));

Is there some kind of precision limit being encountered here?

Thanks,
David


[Attachment #5 (text/html)]

<div dir="ltr"><div>Hello,</div><div><br></div><div>I&#39;ve encountered a violation \
of a uniqueness constraint that is surprising, and I&#39;m hoping for an explanation. \
Below are repro steps:  </div><div><br></div><div><div>create table duplicate_points \
(the_geom geometry(PointZM, 4326));</div><div>create unique index on duplicate_points \
(the_geom);</div><div>insert into duplicate_points (the_geom)  </div><div>values \
(&#39;01010000E0E610000019FF3EE3C2955EC068942EFD4BCA4740000000000000000000000000000000 \
00&#39;),(&#39;01010000E0E610000087E2C8E2C2955EC01BDC94FA4BCA474000000000000000000000000000000000&#39;);</div></div><div><br></div><div>If \
I cast the point column to text then the uniqueness constraint works as \
expected:</div><div><br></div><div><div>create unique index on duplicate_points \
(cast(the_geom as text));</div></div><div><br></div><div>Is there some kind of \
precision limit being encountered \
here?</div><div><br></div><div>Thanks,</div><div>David</div></div>



_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic