I created functions to add comments based on the table and column name
rather than using the oids. I include these calls as part of my table
creation scripts. I assume that by initdb you mean when the database is
created than when Postgres is started. If the oids can change every time
you start Posgtres, this would be a problem.
I can upload my functions for integrating into Postgres as a standard way to
add comments (if requested). Maybe we should consider attaching
descriptions to a table and or column name rather than an oid?
On another note, I have been following the thread about passing NULL
parameters into a C function call. What is happening with this? If a
parameter of a C function call contains NULL, the function is either not
called or returns NULL. I would like to change this so that my C function
can return a value even though its parameters are NULL.
Thanks, Michael
-----Original Message-----
From: Bruce Momjian [SMTP:maillist@candle.pha.pa.us]
Sent: Friday, March 12, 1999 11:31 AM
To: Michael Davis
Cc: pgsql-general@postgreSQL.org
Subject: Re: [GENERAL] Comments on columns?
> I did that and it works great. I would like \dd tablename to show
the table
> comment and its column comments.
Yes, I would like this too, and have considered it. The problem I
have
had with system tables is that the oid of the table and columns is
generated at initdb time, and not assigned constant values as the
pg_proc entries are.
I could modify psql to show comments, but I can't figure out how to
get
the system tables to show this.
In fact, the TODO list has:
* allow pg_descriptions when creating types, tables, columns, and
functions
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania
19026