0

I am mostly a Java developer. Today I am writing some postgres functions. Out of habit I keep trying to document these functions using a Javadoc-like comment style describing the function parameters and return type. Is there an official or widely supported pattern for documenting postgres functions?

3

Not really, however in Postgres and many other DBMS vendors you can comment on various database objects like:

COMMENT ON FUNCTION my_function (timestamp) IS 'Returns Roman Numeral';

As far as I can tell there is no way you can comment on individual arguments for a function.

For the presentation of the documentation, you may want to have a look at:

http://schemaspy.org/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.