[postgis-tickets] [PostGIS] #4661: ST_Distance(geography, geography) fails when schema name contains hyphen character
PostGIS
trac at osgeo.org
Thu Apr 9 07:12:55 PDT 2020
#4661: ST_Distance(geography, geography) fails when schema name contains hyphen
character
-------------------------+---------------------
Reporter: kunszabo67 | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone:
Component: postgis | Version: 2.5.x
Resolution: | Keywords:
-------------------------+---------------------
Comment (by Algunenano):
There are also multiple issues when spatial_ref_sys is not in the
search_path:
{{{
Select "schema-with-hyphen".ST_AsGeoJSON('SRID=3827; POINT(1 1)'::"schema-
with-hyphen".geometry);
ERROR: relation "spatial_ref_sys" does not exist
LINE 1: SELECT auth_name||':'||auth_srid FROM spatial_ref_...
^
QUERY: SELECT auth_name||':'||auth_srid FROM
spatial_ref_sys WHERE srid='3827'
}}}
The following C functions are either not adding the schema or adding it
without quotes:
- getSRSbySRID
- getSRIDbySRS
- gml_is_srid_planar
- rtpg_getSR
- SetSpatialRefSysSchema -> GetProjStringsSPI
- getPostgisConstants (unused)
Also, as Komzpa alerted, this will now break if the schema has quotes in
it, so we should find the proper way to fully escape the identifier and
then ensure all functions use it correctly.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4661#comment:4>
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