PostgreSQL has a syntax to COMMENT on a constraint:
COMMENT ON CONSTRAINT` constraint_name ON table_name IS 'text'`
Example:
COMMENT ON CONSTRAINT bar_col_cons ON bar IS 'Constrains column col';
That tells me how to define comments on constraints. But how do I then see the comments that have been defined?
The output of \d+ on the table includes a list of constraints, but it doesn't show the comments.
\dd <constraint_name> should show the comment, but does not filter on table name.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With