From: | Mike Mascari <mascarm(at)mascari(dot)com> |
---|---|
To: | "Gene Selkov, Jr(dot)" <selkovjr(at)mcs(dot)anl(dot)gov> |
Cc: | "J(dot) Roeleveld" <j(dot)roeleveld(at)softhome(dot)net>, pgsql-general(at)postgreSQL(dot)org |
Subject: | Re: [GENERAL] item descriptions in psql |
Date: | 1999-12-22 08:29:59 |
Message-ID: | 38608C07.4A1A6E1D@mascari.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
"Gene Selkov, Jr." wrote:
>
> > Hi,
> >
> > I just found a reference to descriptions to functions/tables/...etc.
> > and am now wondering how to add them myself?
> >
> > Joost Roeleveld
>
> not sure if there is a shortcut to this (it's short enough already):
>
> INSERT INTO pg_description (objoid, description)
> SELECT oid, 'your description' FROM pg_class WHERE relname = 'your_table_name';
>
> INSERT INTO pg_description (objoid, description)
> SELECT oid, 'your description' FROM pg_proc WHERE proname = 'your_procedure_name';
>
> INSERT INTO pg_description (objoid, description)
> SELECT oid, 'your description' FROM pg_type WHERE typname = 'your_type_name';
>
> INSERT INTO pg_description (objoid, description)
> SELECT oid, 'your description' FROM pg_operator WHERE oprname = 'your_operator_name';
>
> (in case of operators, oprname is '=', '<=', '>>~', etc.)
>
> in older versions (pre-6.3), one had to typecast the names and descriptions:
>
> INSERT INTO pg_description (objoid, description)
> SELECT oid, 'your description'::text FROM pg_type WHERE typname = 'your_type_name'::name;
>
> --Gene
And also note that pg_dump does not yet dump descriptions.
So, until the next release, if your going to document your
database schema, be sure to dump pg_description before
performing any dump..blow-away..reload sequence.
Mike Mascari
From | Date | Subject | |
---|---|---|---|
Next Message | Gene Selkov, Jr. | 1999-12-22 09:00:38 | Re: [GENERAL] item descriptions in psql |
Previous Message | Mike Mascari | 1999-12-22 08:21:22 | Re: [GENERAL] Index pg_proc_prosrc_index: NUMBER OF INDEX' TUPLES (1071)ISNOT THE SAME AS HEAP' (1070) |