Autodocumenting plpgsql function

Started by Rémi Curaover 12 years ago4 messagesgeneral
Jump to latest
#1Rémi Cura
remi.cura@gmail.com

Hey all,
somebody knows of a way to autodocument plpgsql function, in a docxygen
style
(adding tags in comments for instance, or creating doc templates to fill).

It would really help to write the doc and maintain it.

Thanks,

Rémi-C

#2Laurenz Albe
laurenz.albe@cybertec.at
In reply to: Rémi Cura (#1)
Re: Autodocumenting plpgsql function

Rémi Cura wrote:

somebody knows of a way to autodocument plpgsql function, in a docxygen style
(adding tags in comments for instance, or creating doc templates to fill).

It would really help to write the doc and maintain it.

I am not sure what you need, but I see two ways to
document a function:

1) With /** .. */ comments in the beginning.
Maybe doxygen can be used to parse a database dump.

2) With COMMENT ON FUNCTION ... IS '...';
That also keeps the documentation close to where
the code is, and it shows up in database dumps.

Yours,
Laurenz Albe

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Rémi Cura
remi.cura@gmail.com
In reply to: Laurenz Albe (#2)
Re: Autodocumenting plpgsql function

Hey thanks for the answer.

I'm thinking way more than that.
Typically in you comments you include special tags, like @input, then
doxygen will parse it and generate an html documentation.

Cheers,

Rémi-C

2013/11/26 Albe Laurenz <laurenz.albe@wien.gv.at>

Show quoted text

Rémi Cura wrote:

somebody knows of a way to autodocument plpgsql function, in a docxygen

style

(adding tags in comments for instance, or creating doc templates to

fill).

It would really help to write the doc and maintain it.

I am not sure what you need, but I see two ways to
document a function:

1) With /** .. */ comments in the beginning.
Maybe doxygen can be used to parse a database dump.

2) With COMMENT ON FUNCTION ... IS '...';
That also keeps the documentation close to where
the code is, and it shows up in database dumps.

Yours,
Laurenz Albe

#4Laurenz Albe
laurenz.albe@cybertec.at
In reply to: Rémi Cura (#3)
Re: Autodocumenting plpgsql function

Rémi Cura wrote:

somebody knows of a way to autodocument plpgsql function, in a docxygen style
(adding tags in comments for instance, or creating doc templates to fill).

It would really help to write the doc and maintain it.

Typically in you comments you include special tags, like @input, then doxygen will parse it and
generate an html documentation.

I can't think of a way to automatically generate such
documentation from within PostgreSQL, except maybe that
you write a stored procedure that analyzes all functions
and adds a comment with the result.

Yours,
Laurenz Albe

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general