[postgis-commits] about get/set sql funtion name convention

postgis-commits at postgis.refractions.net postgis-commits at postgis.refractions.net
Mon Mar 16 06:38:30 PDT 2009


In sql/mm, it seems only one sql funtion has get/set semantic, that is st_srid.
get version: st_srid()
set version: st_srid(srid num)
same funtion name ,and different para, we could call it as overroad mode.

now we are doing with  raster, there are many get/set semantic sql funtions, we may have 3 choices: 
(1) overroad mode: rt_value(raster, integer, integer, integer, float8) and rt_value(raster, integer, integer, integer)
(2) explicit set/get mode: rt_setvalue(raster, integer, integer, integer, float8) and rt_getvalue(raster, integer, integer, integer)
(3) explicit set/implict get mode: rt_setvalue(raster, integer, integer, integer, float8) and rt_value(raster, integer, integer, integer)

which form of name convention should we follow? 
My view is: 
(2) is clarity, but as for many long name functions, plus get/set seems verbose
(1) seems close to standard, but sql/mm only has jut one model - st_srid could follow,and semantic seems not very clear when funtion in sql statement(is it?).
(3) is OK, but lack of symmetrical beauty.

Jiong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.refractions.net/pipermail/postgis-commits/attachments/20090316/cf2c1ddd/attachment.html


More information about the postgis-commits mailing list