Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: escape postgres dump table column name (#1413)

Danny Xu934860592c5f
diff --git a/plugin/db/pg/pg.go b/plugin/db/pg/pg.go
index a6c332ca2a..073ef4d72d 100644
--- a/plugin/db/pg/pg.go
+++ b/plugin/db/pg/pg.go
@@ -1196,7 +1196,7 @@ func (t *tableSchema) Statement() string {
// Statement returns the statement of a table column.
func (c *columnSchema) Statement() string {
- s := fmt.Sprintf("%s %s", c.columnName, c.dataType)
+ s := fmt.Sprintf("%s %s", quoteIdentifier(c.columnName), c.dataType)
if c.characterMaximumLength != "" {
s += fmt.Sprintf("(%s)", c.characterMaximumLength)
}