[postgis-devel] Noob questions about aliases and undocumented functions

Juris Evertovskis juris at glaive.pro
Sat Jun 18 07:38:22 PDT 2022


Hi all, newbie here.

 

I was going through the OpenGIS SFA spec and discovered some functions that
are in the spec and implemented in PostGIS, but not documented in PostGIS
docs. Before submitting any pull requests I wanted to check if these things
are not intentionally undocumented (e.g. semi-deprecated).

 

Namely these are some aliases like ST_PolyFromText is implemented, but not
documented. However, ST_PolygonFromText is documented, which seems to be
implemented as an alias to ST_PolyFromText. Also a bunch of *FromWKB
function, e.g. ST_PolygonFromWKB, ST_MLineFromWKB, ST_MPolyFromWKB. I
noticed that these are listed in RFC03 as "PUBLIC KEEP" and thus they were
intended to be documented and are mentioned in some older reference (
https://postgis.net/docs/manual-1.3/ch06.html ), but I can't find the status
of that RFC and it's from 2009 so the status of these functions might have
changed since then anyways.

 

So could you give me a little guidance and tell if these functions should be
documented?

 

--

 

One other detail that got me confused was the use of aliases in
implementations. I was looking at these sources
https://github.com/postgis/postgis/blob/master/postgis/postgis.sql.in so
please tell me if it's the wrong file for implementations :) But my question
is whether it is encouraged to use aliases or to NOT use aliases?

 

I am asking this because some functions like the aforementioned
ST_PolygonFromText seem to be a straight up alias of ST_PolyFromText
https://github.com/postgis/postgis/blob/master/postgis/postgis.sql.in#L5513

However ST_PolyFromWKB and ST_PolygonFromWKB appear to have identical
implementations without referring to one another.

Which way is preferred? Or am I missing some detail?

 

Regards,

Juris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20220618/e8580e95/attachment.htm>


More information about the postgis-devel mailing list