Skip to Main Content
Practical PostgreSQL
book

Practical PostgreSQL

by Joshua D. Drake, John C. Worsley
January 2002
Intermediate to advanced content levelIntermediate to advanced
640 pages
16h 39m
English
O'Reilly Media, Inc.
Content preview from Practical PostgreSQL

Comment

Adds a comment to an object within the database.

Synopsis

COMMENT ON
[
  [ DATABASE | INDEX | RULE | SEQUENCE | TABLE | TYPE | VIEW ] object_name |
  COLUMN table_name.column_name |
  FUNCTION func_name ( argument [, ...] ) |
  AGGREGATE aggr_func aggr_type |
  OPERATOR operator ( left_type , right_type ) |
  TRIGGER trigger_name ON table_name
] IS 'text'

Parameters

DATABASE | INDEX | RULE | SEQUENCE | TABLE | TYPE | VIEW

The type of database object that you are adding a comment to.

object_name

The name of the object (database, index, rule, sequence, table, type, or view) to which you are adding a comment.

COLUMN table_name.column_name

The complete column name (within the table table_name) you are adding a comment to.

FUNCTION func_name (argument [, ...] )

The name of the function on which you are commenting, specified also by the argument data types that it accepts.

AGGREGATE aggr_func aggr_type

The aggregate function name (and associated data type aggr_type, which it accepts) to which you are adding a comment.

OPERATOR operator ( left_type, right_type )

The name of the operator on which you are commenting (operator), further described by the data type it operates on to the left, and the data type it operates on to the right, separated by a comma, enclosed within parentheses. If either side is inapplicable, the NONE keyword may be used.

TRIGGER trigger_name ON table_name

The name of the trigger on which you are placing a comment, and the name of the table upon which the trigger is placed.

text

The actual ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

PostgreSQL: Up and Running, 2nd Edition

PostgreSQL: Up and Running, 2nd Edition

Regina O. Obe, Leo S. Hsu
Learning PostgreSQL 11 - Third Edition

Learning PostgreSQL 11 - Third Edition

Christopher Travers, Andrey Volkov
Learn PostgreSQL

Learn PostgreSQL

Luca Ferrari, Enrico Pirozzi
PostgreSQL 13 Cookbook

PostgreSQL 13 Cookbook

Vallarapu Naga Avinash Kumar

Publisher Resources

ISBN: 9781449309770Supplemental ContentErrata Page