[postgis-users] [postgis-devel] Upgrade issues

James Sewell james.sewell at jirotech.com
Tue Sep 3 20:13:47 PDT 2019


> >  I can't answer is how this has not been hit before???
>
> Yeah, hard to believe, this is very old code… I guess people just don’t
> use non-WGS84 geography very often, or if they do they don’t think to set
> up their type constraints to enforce it. Or they’ve never got around to
> upgrading.
>
> Anyways, the offending code is very old, and here it is:
>
>
> https://github.com/postgis/postgis/blob/svn-trunk/postgis/gserialized_typmod.c#L296
>
> When reading in the string “geography(point, 4267)” a typmod string, in
> the case of geography, the system checks that the provided SRID number is
> in fact a geodetic coordinate system and WHoops, if this is running in the
> context of pg_upgrade, that means it needs to read spatial_ref_sys, even
> though it’s still at the “setting up the schemas” stage of the process.
>
> Since this problem has been around forever, that kind fo points to the
> fact that maybe enforcing the geodetic nature of geography typmods isn’t
> the most important piece of data integrity checking we have to do, so the
> simplest fix would be to excise this check in all patch releases. Then the
> fix would be to upgrade to the latest patch releases before upgrading.
>
> P.
>

Interesting, that looks like exactly what I was after (but didn't want to
ask as removing checks is mostly frowned upon).

In the meantime I suppose I'll patch up a version for my import and be on
my way.

Thanks for the quick replies!

-- 
The contents of this email are confidential and may be subject to legal or 
professional privilege and copyright. No representation is made that this 
email is free of viruses or other defects. If you have received this 
communication in error, you may not copy or distribute any part of it or 
otherwise disclose its contents to anyone. Please advise the sender of your 
incorrect receipt of this correspondence.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20190904/d19d37d2/attachment.html>


More information about the postgis-users mailing list