postgresql/src/backend
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
..
access Add blcksz to struct ControlFileData to check BLCKSZ is same 1999-10-12 10:21:56 +00:00
bootstrap XLOG (also known as WAL -:)) Bootstrap/Startup/Shutdown. 1999-10-06 21:58:18 +00:00
catalog This patch implements ORACLE's COMMENT SQL command. 1999-10-15 01:49:49 +00:00
commands This patch implements ORACLE's COMMENT SQL command. 1999-10-15 01:49:49 +00:00
executor Split 'BufFile' routines out of fd.c into a new module, buffile.c. Extend 1999-10-13 15:02:32 +00:00
lib Cope with versions of vsnprintf() written by people who 1999-09-08 16:31:38 +00:00
libpq Add README.SSL 1999-09-27 03:16:09 +00:00
main Move some system includes into c.h, and remove duplicates. 1999-07-17 20:18:55 +00:00
nodes Fix planner and rewriter to follow SQL semantics for tables that are 1999-10-07 04:23:24 +00:00
optimizer Fix planner and rewriter to follow SQL semantics for tables that are 1999-10-07 04:23:24 +00:00
parser This patch implements ORACLE's COMMENT SQL command. 1999-10-15 01:49:49 +00:00
port Fix for AIX dynaloader from Zeugswetter Andrea 1999-09-28 17:35:12 +00:00
postmaster Update display of debug levels. 1999-10-08 05:36:58 +00:00
regex Move some system includes into c.h, and remove duplicates. 1999-07-17 20:18:55 +00:00
rewrite Fix planner and rewriter to follow SQL semantics for tables that are 1999-10-07 04:23:24 +00:00
storage Split 'BufFile' routines out of fd.c into a new module, buffile.c. Extend 1999-10-13 15:02:32 +00:00
tcop This patch implements ORACLE's COMMENT SQL command. 1999-10-15 01:49:49 +00:00
tioga Move some system includes into c.h, and remove duplicates. 1999-07-17 20:18:55 +00:00
utils Split 'BufFile' routines out of fd.c into a new module, buffile.c. Extend 1999-10-13 15:02:32 +00:00
Makefile Export include/utils/mcxt.h so that external stuff can include 1999-03-07 23:05:57 +00:00