Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 381AE2E2DB9 for ; Tue, 4 Mar 2008 17:07:19 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 13081-03 for ; Tue, 4 Mar 2008 17:07:16 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from smtpauth.rollernet.us (smtpauth.rollernet.us [208.11.75.5]) by postgresql.org (Postfix) with ESMTP id 132B72E14BF for ; Tue, 4 Mar 2008 17:07:16 -0400 (AST) Received: from smtpauth.rollernet.us (localhost.localdomain [127.0.0.1]) by smtpauth.rollernet.us (Postfix) with ESMTP id 0CFC1594062; Tue, 4 Mar 2008 13:07:13 -0800 (PST) Received: from iron.denterprises.org (ool-4350518d.dyn.optonline.net [67.80.81.141]) by smtpauth.rollernet.us (Postfix) with ESMTP; Tue, 4 Mar 2008 13:07:12 -0800 (PST) Received: from [127.0.0.1] (kell.iron.denterprises.org [192.168.171.80]) by iron.denterprises.org (Postfix) with ESMTP id C65A31676CB; Tue, 4 Mar 2008 16:07:11 -0500 (EST) Message-ID: <47CDB9D2.5070106@denterprises.org> Date: Tue, 04 Mar 2008 16:06:26 -0500 From: Colin Wetherbee User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Shahaf Abileah CC: pgsql-general@postgresql.org Subject: Re: Documenting a DB schema References: <082D8A131DF72A4D88C908A1AD3DEB22023B34F2@mail-1.rf.lan> In-Reply-To: <082D8A131DF72A4D88C908A1AD3DEB22023B34F2@mail-1.rf.lan> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Antivirus: avast! (VPS 080304-0, 03/04/2008), Outbound message X-Antivirus-Status: Clean X-Rollernet-Abuse: Processed by Roller Network Mail Services. Contact abuse@rollernet.us to report violations. Abuse policy: http://rollernet.us/abuse.php X-Rollernet-Submit: Submit ID 5e2f.47cdba00.b91c7.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/103 X-Sequence-Number: 129425 Shahaf Abileah wrote: > It would be great if the documentation could be kept as close to the > code as possible – that way we stand a chance of keeping it up to date. > So, in the same way that Java docs go right there on top of the class or > method definitions, it would be great if I could attach my comments to > the table definitions. It looks like MySQL has that kind of capability: Please do not cross-post. One list is enough. PostgreSQL has that functionality, too. cww=# CREATE TABLE foo (a INTEGER, b INTEGER); CREATE TABLE cww=# COMMENT ON TABLE foo IS 'my comment'; COMMENT cww=# \d+ List of relations Schema | Name | Type | Owner | Description --------+------+-------+-------+------------- public | foo | table | cww | my comment (1 row) COMMENT is well-documented. http://www.postgresql.org/docs/8.3/static/sql-comment.html Colin