Re: Documenting a DB schema

Поиск
Список
Период
Сортировка
От Colin Wetherbee
Тема Re: Documenting a DB schema
Дата
Msg-id 47CDB9D2.5070106@denterprises.org
обсуждение исходный текст
Ответ на Documenting a DB schema  ("Shahaf Abileah" <shahaf@redfin.com>)
Список pgsql-general
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

В списке pgsql-general по дате отправления:

Предыдущее
От: Alan Hodgson
Дата:
Сообщение: Re: Documenting a DB schema
Следующее
От: Tomás Di Doménico
Дата:
Сообщение: Re: Documenting a DB schema