postgresql/src/tools
Bruce Momjian 7acc237744 This patch implements ORACLE's COMMENT SQL command.
>From the ORACLE 7 SQL Language Reference Manual:
-----------------------------------------------------
COMMENT

Purpose:

To add a comment about a table, view, snapshot, or
column into the data dictionary.

Prerequisites:

The table, view, or snapshot must be in your own
schema
or you must have COMMENT ANY TABLE system privilege.

Syntax:

COMMENT ON [ TABLE table ] |
           [ COLUMN table.column] IS 'text'

You can effectively drop a comment from the database
by setting it to the empty string ''.
-----------------------------------------------------

Example:

COMMENT ON TABLE workorders IS
   'Maintains base records for workorder information';

COMMENT ON COLUMN workorders.hours IS
   'Number of hours the engineer worked on the task';

to drop a comment:

COMMENT ON COLUMN workorders.hours IS '';

The current patch will simply perform the insert into
pg_description, as per the TODO. And, of course, when
the table is dropped, any comments relating to it
or any of its attributes are also dropped. I haven't
looked at the ODBC source yet, but I do know from
an ODBC client standpoint that the standard does
support the notion of table and column comments.
Hopefully the ODBC driver is already fetching these
values from pg_description, but if not, it should be
trivial.

Hope this makes the grade,

Mike Mascari
(mascarim@yahoo.com)
1999-10-15 01:49:49 +00:00
..
backend I have been working with user defined types and user defined c 1999-09-28 04:34:56 +00:00
entab Apply Win32 patch from Horak Daniel. 1999-01-17 06:20:06 +00:00
make_diff Reorganize developers files. 1997-09-08 04:14:01 +00:00
mkldexport End of the make file simplifications. 1996-11-12 11:43:32 +00:00
pginclude Add c.h to exclusion list. 1999-07-17 15:37:30 +00:00
pgindent This patch implements ORACLE's COMMENT SQL command. 1999-10-15 01:49:49 +00:00
RELEASE_CHANGES Update jdbc for release version #> 1999-10-13 11:08:57 +00:00
ccsym From: Jeroen van Vianen <jeroenv@design.nl> 1998-03-15 08:33:59 +00:00
find_static From: Jeroen van Vianen <jeroenv@design.nl> 1998-03-15 08:33:59 +00:00
find_typedef Update find_typedefs for bsdi 4.0. 1999-02-10 17:14:32 +00:00
make_ctags Add TEMP tables/indexes. Add COPY pfree(). Other cleanups. 1999-02-02 03:45:56 +00:00
make_etags Developer reorganization. 1997-09-08 04:19:50 +00:00
make_keywords.README Cleanup for find_keywords. 1997-09-27 17:25:48 +00:00
make_mkid Developer reorganization. 1997-09-08 04:19:50 +00:00
release_prep Script for preparing derived files during tarball construction. 1999-03-20 17:53:54 +00:00