RE: [GENERAL] Comments on columns?

From: Michael Davis <michael(dot)davis(at)prevuenet(dot)com>
To: "'Bruce Momjian'" <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: RE: [GENERAL] Comments on columns?
Date: 1999-03-12 18:46:58
Message-ID: 93C04F1F5173D211A27900105AA8FCFC145279@lambic.prevuenet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

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(at)candle(dot)pha(dot)pa(dot)us]
Sent: Friday, March 12, 1999 11:31 AM
To: Michael Davis
Cc: pgsql-general(at)postgreSQL(dot)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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania
19026

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrei de Oliveira Mosman 1999-03-12 20:33:02 Core Dumped
Previous Message Bruce Momjian 1999-03-12 18:30:37 Re: [GENERAL] Comments on columns?

Browse pgsql-hackers by date

  From Date Subject
Next Message Jason Venner 1999-03-12 20:48:05 Simple C++ program using libpq that failes very quickly using the lo interface
Previous Message Tom Lane 1999-03-12 15:46:22 Re: [HACKERS] tutorial won't compile in current tree.