Re: Table Comments

From: "Octavio Alvarez" <alvarezp(at)alvarezp(dot)ods(dot)org>
To: pgsql-general(at)postgresql(dot)org, "Carlos Mennens" <carlos(dot)mennens(at)gmail(dot)com>
Subject: Re: Table Comments
Date: 2010-09-15 15:59:17
Message-ID: op.vi2z03d34oyyg1@alvarezp-ws
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 15 Sep 2010 08:53:16 -0700, Carlos Mennens
<carlos(dot)mennens(at)gmail(dot)com> wrote:

> CREATE TABLE weather (
> temp_lo int, -- low temperature
> );
>
> I did a search and don't understand in what aspect are the 'comments'
> relevant / visible? I don't see the comments when I attempt to list /
> describe the table with \d weather;

Those are comments to the SQL code, not comments to the columns. Comments
to SQL code are fully ignored by PostgreSQL on execution.

Those are useful if you have an SQL script and you want to document
something there.

For column comments you might want to take a look at the COMMENT command.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Hull 2010-09-15 16:02:14 Using libpq, floats and binary data
Previous Message Bill Moran 2010-09-15 15:57:34 Re: Table Comments