Setting the comment of a column to that of another column in Postgresql

前端 未结 2 357
鱼传尺愫
鱼传尺愫 2021-01-18 09:01

Suppose I create a table in Postgresql with a comment on a column:

create table t1 (
   c1 varchar(10)
);
comment on column t1.c1 is \'foo\';
2条回答
  •  清歌不尽
    2021-01-18 09:28

    You can retrieve comments on columns using the system function col_description(table_oid, column_number). See this page for further details.

提交回复
热议问题