[postgis-devel] [PostGIS] #484: rtpostgis.sql.in.c using old style 1.3 syntax and other arcane stuff
PostGIS
trac at osgeo.org
Fri Apr 2 13:20:51 PDT 2010
#484: rtpostgis.sql.in.c using old style 1.3 syntax and other arcane stuff
-----------------------+----------------------------------------------------
Reporter: robe | Owner: pracine
Type: task | Status: new
Priority: low | Milestone: WKTRaster Future
Component: wktraster | Version: trunk
Keywords: |
-----------------------+----------------------------------------------------
This I'm not sure you want to change just yet and I forget why we had this
convention in 1.3. I think it was to support older PostgreSQL installs
like 8.1.
I see in your function you have
{{{
CREATEFUNCTION st_convexhull(raster)
RETURNS GEOMETRY
AS 'MODULE_PATHNAME','RASTER_convex_hull'
LANGUAGE 'C' _IMMUTABLE_STRICT;
}}}
We do now (though I guess you may want to leave costs out if you want 8.2
users to be able to use it)
{{{
CREATE OR REPLACE FUNCTION ST_ConvexHull(geometry)
RETURNS geometry
AS 'MODULE_PATHNAME','convexhull'
LANGUAGE 'C' IMMUTABLE STRICT
COST 100;
}}}
On a side note, I see you have inherited our bad habits of not naming the
variables going into input. This was done a long time ago I think pre 8.0
before it was okay to put names of variables in the input. Probably not
too worthwhile changing now except its confusing reading it when you see
integer that that goes to band number or float8 is x etc. Again postgis
sql.in.c files are more guilty of this atrocity.
Also you are not always using $ quoting syntax which is much easier to
read and has been supported since PostgreSQL 8.0. Admittedly the whole
PostGIS code sql file is guilty of this atrocity and worse so so can't
complain too much.
Just thought I'd butt my nose in :)
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/484>
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-devel
mailing list