<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"\@SimSun";
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"SimSun","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"SimSun","serif";}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page Section1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Hi Jiong.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>The original design opted for 2) but then we moved to 3) because
“most database functions are getters, not setters”. There are a other
examples in PostGIS:<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>-GeometryType (not GetGeometryType)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>-ST_NumGeometries (not ST_GetNumGeometries)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>-ST_NumPoints (not ST_GetNumPoints)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>-ST_X (not ST_GetX)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>-etc..<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Actually many functions could get the “Get” prefix
but they don’t. This corresponds more to 3).<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Pierre<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
postgis-devel-bounces@postgis.refractions.net
[mailto:postgis-devel-bounces@postgis.refractions.net] <b>On Behalf Of </b>xie_jiong<br>
<b>Sent:</b> 16 mars 2009 21:03<br>
<b>To:</b> PostGIS Development Discussion<br>
<b>Subject:</b> [******] [postgis-devel] about get/set wktraster sql funtion
name convention<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<div>
<p class=MsoNormal>Hi<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:10.0pt'>In sql/mm, it seems only one
sql funtion has get/set semantic, that is st_srid.</span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:10.0pt'>get version: st_srid()</span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:10.0pt'>set version: st_srid(srid
num)</span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:10.0pt'>same funtion name ,and
different para, we could call it as overroad</span><span style='font-size:10.0pt;
font-family:"Times New Roman","serif"'> </span><span style='font-size:
10.0pt'>mode.</span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'> </span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:10.0pt'>now we are doing with</span><span
style='font-size:10.0pt;font-family:"Times New Roman","serif"'> </span><span
style='font-size:10.0pt'> raster, there are many get/set semantic sql funtions,
we may have 3 choices: </span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:10.0pt'>(1) overroad mode:
rt_value(raster, integer, integer, integer, float8) and rt_value(raster,
integer, integer, integer)</span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:10.0pt'>(2) explicit set/get mode:
rt_setvalue(raster, integer, integer, integer, float8) and rt_getvalue(raster,
integer, integer, integer)</span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:10.0pt'>(3) explicit set/implict get
mode: rt_setvalue(raster, integer, integer, integer, float8) and
rt_value(raster, integer, integer, integer)</span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'> </span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:10.0pt'>which</span><span
style='font-size:10.0pt;font-family:"Times New Roman","serif"'> </span><span
style='font-size:10.0pt'>form of name convention</span><span style='font-size:
10.0pt;font-family:"Times New Roman","serif"'> </span><span
style='font-size:10.0pt'>should we follow? </span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:10.0pt'>My view is: </span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:10.0pt'>(2) is clarity, but as for
many long name functions, plus get/set seems verbose</span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:10.0pt'>(1) seems close to standard, but
sql/mm only has jut one model - st_srid could follow,and semantic</span><span
style='font-size:10.0pt;font-family:"Times New Roman","serif"'> </span><span
style='font-size:10.0pt'>seems not</span><span style='font-size:10.0pt;
font-family:"Times New Roman","serif"'> </span><span style='font-size:
10.0pt'>very clear when funtion in sql statement(is it?).</span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:10.0pt'>(3) is OK, but</span><span
style='font-size:10.0pt;font-family:"Times New Roman","serif"'> </span><span
style='font-size:10.0pt'>lack of</span><span style='font-size:10.0pt;
font-family:"Times New Roman","serif"'> </span><span style='font-size:
10.0pt'>symmetrical beauty.</span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'> </span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:10.0pt'>Jiong</span><o:p></o:p></p>
</div>
<div class=MsoNormal align=center style='text-align:center'>
<hr size=2 width="100%" align=center>
</div>
<p class=MsoNormal>_______________________________________________<br>
postgis-commits mailing list<br>
postgis-commits@postgis.refractions.net<br>
http://lists.refractions.net/mailman/listinfo/postgis-commits<o:p></o:p></p>
</div>
</div>
</body>
</html>