这就像(对于单列constaint):
原文链接:https://www.f2er.com/postgresql/192646.htmltableName_columnName_key
\d tableName
或使用pg_constraint
系统目录:
SELECT conname FROM pg_constraint WHERE conrelid = (SELECT oid FROM pg_class WHERE relname LIKE 'tableName');
也可以从对象树中的pgAdmin获取它.