[PostGIS] #5697: fix or document id escaping for ST_EstimatedExtent params

PostGIS trac at osgeo.org
Wed Apr 17 14:33:41 PDT 2024


#5697: fix or document id escaping for ST_EstimatedExtent params
----------------------+---------------------------
  Reporter:  Yuri     |      Owner:  pramsey
      Type:  defect   |     Status:  new
  Priority:  medium   |  Milestone:  PostGIS 3.4.3
 Component:  postgis  |    Version:  3.4.x
Resolution:           |   Keywords:
----------------------+---------------------------
Comment (by pramsey):

 If you have a good improvement to the doco to submit, I'd be happy to look
 it over. The namespace and table get parsed using the regclassin function,
 like this:
 {{{
 snprintf(nsp_tbl, sz, "\"%s\".\"%s\"", nsp, tbl);
 tbl_oid = DatumGetObjectId(DirectFunctionCall1(regclassin,
 CStringGetDatum(nsp_tbl)));
 }}}
 The attribute name gets searched for a little more literally, like this
 {{{
 HeapTuple att_tup = SearchSysCache2(
    ATTNAME,
    ObjectIdGetDatum(idx_oid),
    PointerGetDatum(colname));
 }}}
 Hence the slight differences in handling. I think regclassin seemed like a
 cute trick at the time.
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5697#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