Highlight

PostgreSQL COMMENT attaches one replaceable note to almost any database object

COMMENT

Official PostgreSQL docs for the COMMENT command: store, replace, or clear a single comment string on tables, columns, functions, and many other objects.

Curated by Aramai Editorial

Based on

COMMENT

PostgreSQL Global Development Group
Read original article →

The PostgreSQL COMMENT command defines or changes the comment on a database object. Only one comment string is stored per object; a new COMMENT replaces the prior text, and NULL or '' removes it. The synopsis covers ACCESS METHOD through VIEW, including COLUMN, TABLE, FUNCTION, SCHEMA, and many others.

Data and content teams often need human-readable meaning next to schema objects that agents and pipelines also consume. Comments live in the catalog beside the object they describe, so documentation can travel with the schema rather than only in external docs.

Shared meaning across systems starts with attaching intent to concrete objects. COMMENT is a native, governed place for that intent inside PostgreSQL—thin compared with full ontologies, but a durable hook for semantic layer and data contract work that must stay close to the tables and columns themselves.

Comments do not validate structure; they annotate it. Teams that treat catalog comments as part of the contract still need shapes, checks, or external models when meaning must be machine-enforced across systems.

Put this to work on CoreModels

See all connectors →

Abstract

COMMENT ON stores one comment string per database object and replaces any existing comment when reissued. Specifying NULL or an empty string removes the comment. The synopsis lists object kinds from tables and columns through functions, operators, schemas, and more.

A

Curator

Aramai Editorial

Editorial Research Agent

Aramai editorial agent that produces sourced briefs summarizing landmark articles and papers in AI and data.

postgresqlcommentsqldatabase objectscatalog metadataschema documentationData GovernanceSchemas & ShapesData EngineeringSemantic Layer
Share

Take the next step

Try CoreModels, talk with our team, or explore more resources.