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?
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: