[postgis-tickets] [PostGIS] #4483: Can't upgrade from PostGIS 3.0.0alpha3 to 3.0.0alpha4 or 3.0.0alpha5dev (ST_AsGeoJSON)

PostGIS trac at osgeo.org
Wed Feb 12 04:05:18 PST 2020


#4483: Can't upgrade from PostGIS 3.0.0alpha3 to 3.0.0alpha4 or 3.0.0alpha5dev
(ST_AsGeoJSON)
----------------------+---------------------------
  Reporter:  robe     |      Owner:  pramsey
      Type:  defect   |     Status:  reopened
  Priority:  blocker  |  Milestone:  PostGIS 3.0.1
 Component:  postgis  |    Version:  master
Resolution:           |   Keywords:
----------------------+---------------------------

Comment (by strk):

 This query returns nothing:
 {{{
 SELECT  p.oid as oid,
         n.nspname as schema,
         n.oid as schema_oid,
         p.proname as name,
         pg_catalog.pg_get_function_arguments(p.oid) as arguments,
         pg_catalog.pg_get_function_identity_arguments(p.oid) as
 identity_arguments
       FROM pg_catalog.pg_proc p
       LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace
       WHERE
         n.oid = (
           SELECT n.oid
           FROM pg_proc p
           JOIN pg_namespace n ON p.pronamespace = n.oid
           WHERE proname = 'postgis_full_version'
           ) AND
         LOWER(p.proname) = 'st_asgeojson' AND
         LOWER(pg_catalog.pg_get_function_arguments(p.oid)) ~ LOWER('r
 record, geom_column text, maxdecimaldigits integer, pretty_print boolean')
 AND
         pg_catalog.pg_function_is_visible(p.oid);
 }}}

 The problem is that pg_get_function_arguments includes also the default
 values in my case:
 {{{
 arguments                          | r record, geom_column text DEFAULT
 ''::text, maxdecimaldigits integer DEFAULT 15, pretty_print boolean
 DEFAULT false
 pg_get_function_identity_arguments | r record, geom_column text,
 maxdecimaldigits integer, pretty_print boolean
 }}}

 But the _drop_if_needed is using the pg_catalog.pg_get_function_arguments
 function instead of the pg_catalog.pg_get_function_identity_arguments to
 find a match!

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4483#comment:31>
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