[postgis-users] Postigis self documenting code?

Paragon Corporation lr at pcorp.us
Sat Jun 21 16:01:09 PDT 2008


In response to your comments

> Well, maybe this is the best place to start....

> And another benefit is that auxiliary meta could be added at the same time
in a separate table (see below).

I think its more maintainable as a separate file as the way you suggested
and a separate more informative table would be helpful.  If we can agree on
specific tags to use, I think it would make the parsing easier and less up
to the whims of the postgis doc book.  The additional tables can be used for
a building a help system ala the R-help as it looks like you have already
started.  I think large comments with examples may be more desirable in a
separate table.

> I had not given thought to the issue of how long the comments might be.
I've only viewed comments in a psql terminal, > > so long comment strings
simply wrap. But I can see that PgAdmin must enforce some max length (looks
like around >  > 140 char) to maintain the readability within the
'properties view'. Do you know if PostgreSQL enforces a max length on the >
comments field?

Technically PgAdmin doesn't place constraints per say.  It just will only
show the first 140 char in the comment pane and if you double click on the
function, you will see a scrollable field where you can see all the
comments.  I just think it would be a bit distracting to have a huge
definition in there.  If I needed to read that much, I would go to the docs.
That's more a personal preference though.

My guess is that Postgres does not place constraints on length of comments.
I pasted a fairly huge paragraph in it and it took it.  Strangely Postgres
is I think the only database I have run into where from an efficiency
standpoint it may actually be better to not put constraints on your field
lengths and there is no real penalty of not doing so as with other databases
(aside from users going crazy stuffing the kitchen sink in there).  


More information about the postgis-users mailing list