[postgis-users] [postgis-devel] Turning spatial_ref_sys into a view to separate system vs. user entries
Regina Obe
lr at pcorp.us
Tue Feb 1 21:32:06 PST 2022
> I've pushed a 'spatial-ref-sys-view' branch in official repository (for
pick up by
> bots) that turns "spatial_ref_sys" into a view and creates
> "spatial_ref_sys_postgis" and "spatial_ref_sys_user"
> tables.
>
> The view would pick up entries from "spatial_ref_sys_user" or (if not
found)
> from "spatial_ref_sys_postgis" to allow users to both override and extend
> the system entries.
>
> Such setup allows to keep system entries always up-to-date on upgrade (
> https://trac.osgeo.org/postgis/ticket/5024 )
>
> The postgis_full_version() function will report the presence (and number
of)
> overridden, to avoid users to accidentally use out-of-date proj strings or
> SRIDs which previously did not exist but appeared after upgrade.
>
> Insert/delete/update operations on spatial_ref_sys view will be proxied to
> the spatial_ref_sys_user table, for backward compatibility.
>
> Bots are happy with the change (bots also test upgrades from older postgis
> versions, as old as 2.3).
>
> How do you feel about me pushing all this code to the master branch for
> more human testing?
>
> --strk;
>
> Libre GIS consultant/developer
> https://strk.kbt.io/services.html
[Regina Obe]
+1
Thanks for the great work. It's been over 10 years we've been thinking
about this.
As much as I'm scared of the thought of changing spatial_ref_sys into a
view,
I feel we must make it and now is as great a time as any.
Aside from the reasons you've stated there is also the case of the numerous
changes happening in proj and many spatial reference systems added these
days that people may prefer to keep their old (possibly wrong versions) to
agree with something else. This does give them the option to do so.
I've added users list to this thread to see if anyone in the user community
has any thoughts on the matter or any other concerns not addressed.
Thanks,
Regina
More information about the postgis-users
mailing list