pgrouting icon indicating copy to clipboard operation
pgrouting copied to clipboard

pgRouting SQL coding standard for documents and examples

Open sanak opened this issue 10 years ago • 6 comments

PostGIS documents seem to be written by a certain rule (ST_XyzAbc and upper case SQL words .etc). Should we follow the SQL coding standard except pgRouting function name (pgr_xyzAbc .etc) ?

sanak avatar Aug 02 '15 13:08 sanak

Probably not worth the effort. The reason PostGIS does that is to satisfy SQL/MM convention (and then we said might as well make all our functions that way even if they aren't SQL/MM to minimize on confusion). Since your functions aren't SQL/MM defined, you have no precedence for it. You just need to be consistent within your own functions/documentation which I think you are.

robe2 avatar Aug 02 '15 15:08 robe2

Okay. Thanks for confirmation. (I forgot that SQL/MM is OGC standard...)

I found some inconsistencies in pgr_alphaShape and pgr_pointsAsPolygon documents. So, I will keep this status as opened for another function documents for a while.

sanak avatar Aug 02 '15 15:08 sanak

I think that we roughly were mimicing the postgis style because we are dependent on postgis so again just trying to be consistent. I don't think we are rigid about this or have even documented that we have a style. We might want to add a style guide statement to the development standards docs.

woodbri avatar Aug 02 '15 17:08 woodbri

@woodbri Okay. Thanks for comment.

sanak avatar Aug 03 '15 00:08 sanak

Eventually we need a pgRouting standard on function names:

  • when to use acronyms
  • when to use words
  • how to indicate in the function name which "family" of functions it belongs to.

But I think also it will need a full review of how the family of functions are formed A for versions 2.x all new families of functions are proposed, then before 3.0 this can be reviewed and make the standard.

cvvergara avatar Aug 24 '16 18:08 cvvergara

#400 is related

cvvergara avatar Aug 24 '16 19:08 cvvergara