Implemented postgres table and enum comment generation

This commit is contained in:
Volker Lieber 2024-09-24 20:41:27 +02:00
parent 929109622e
commit ff82eb5df7
4 changed files with 33 additions and 3 deletions

View file

@ -14,7 +14,7 @@ type postgresQuerySet struct{}
func (p postgresQuerySet) GetTablesMetaData(db *sql.DB, schemaName string, tableType metadata.TableType) ([]metadata.Table, error) {
query := `
SELECT table_name as "table.name"
SELECT table_name as "table.name", obj_description((table_schema||'.'||quote_ident(table_name))::regclass) as "table.comment"
FROM information_schema.tables
WHERE table_schema = $1 and table_type = $2
ORDER BY table_name;