User-defined SRIDs are not working after Postgis 3.3.2 to 3.5.3 update
Erik Wienhold
ewie at ewie.name
Fri Jul 25 06:42:06 PDT 2025
On 2025-07-25 15:08 +0200, Alexander Trufanov wrote:
> Hello,
>
> I have a Debian Bookworm-based system with Postgresql 15 and PostGis 3.3.2
> on it.
> It works well, but recently I was faced with a requirement to use ST_Clip()
> function with touching argument support. Thus I need PostGis 3.5.x+.
>
> There was no PostGis newer than 3.3.2 in the official repos, but I managed
> to installed it with
>
> ```
>
> sudo apt install -y postgresql-common
> sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh bookworm
>
> sudo apt install postgis=3.5* postgresql-15-postgis-3=3.5*
> postgresql-15-postgis-3-scripts=3.5*
> ```
>
> Then I updated my Postgis extension.
>
> And now I'm facing an unexpectable problem. All my stored procedures are
> working fine unless they are trying to use user-defined SRIDs from the
> public.spatial_ref_sys. If so, they fail with following error message:
>
> "ERROR: Unable to determine 'postgis' install schema
> SQL state: XX000"
>
This is the source of that error:
https://git.osgeo.org/gitea/postgis/postgis/src/tag/3.5.3/libpgcommon/lwgeom_pg.c#L169
Can you please check which namespaces PostGIS finds with these two
queries:
SELECT extnamespace::regnamespace FROM pg_extension WHERE extname = 'postgis';
SELECT pronamespace::regnamespace FROM pg_proc WHERE proname = 'postgis_full_version';
> For example, this works:
> SELECT ST_Transform('SRID=4326;POINT(0 0)'::geometry, 4326)
> and this is not:
> SELECT ST_Transform('SRID=4326;POINT(0 0)'::geometry, 100100)
>
> My 100100 srid record is:
> select * from public.spatial_ref_sys where srid = 100100
> 100100, '', 1, 'GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS
> 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]],
> AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0],
> UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4326"]]',
> '+proj=longlat +datum=WGS84 +no_defs'
>
> I was trying to update this record in the table in case there is some
> trigger that should register it in some new cache or config - but it does
> not help.
>
> Is there any cache or something else to clean in public.spatial_ref_sys
> for postgis 4.5.3?
> Maybe user-defined srids should now be registered in another way?
>
> Also the error message "Unable to determine 'postgis' install schema " is
> quite confusing.
>
> --
> With best regards,
> Alexander Trufanov
--
Erik Wienhold
More information about the postgis-users
mailing list