Is it possible to create a comment for a table in postgres? If not - how is a table typically documented in a similar manner to columns
1
vote
2
answers
3028
views
It's possible to have documentation of a particular column within a postgres table, as it outlined here: https://dba.stackexchange.com/questions/160667/how-to-add-comment-to-a-column-in-a-table-in-postgres
I'm not sure how to create a comment for a particular table though, and am interested in doing so _on_ the database (rather than in confluence or something similar).
The only thing that I can think of is to create an additional table
documentation__tables
, or something similar, and with columns such as
table_name | description
--------------------------
... | ...
Where table_name
would match the name of the table from the schema.
I'm not sure if there's a more idiomatic approach than this, or if there's a typical approach to documenting a table of the database within the database itself.
Asked by baxx
(326 rep)
Nov 14, 2022, 03:52 PM
Last activity: Nov 14, 2022, 09:22 PM
Last activity: Nov 14, 2022, 09:22 PM