Skip to content

Commit 6d2b66c

Browse files
committed
Merge pull request puppetlabs#558 from hunner/fix_dbcomment
Fix comment detection
2 parents ed66176 + bd80c54 commit 6d2b66c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

manifests/server/database.pp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@
8080
if $comment {
8181
Exec[ $createdb_command ]->
8282
postgresql_psql {"COMMENT ON DATABASE ${dbname} IS '${comment}'":
83-
unless => "SELECT pg_catalog.shobj_description(d.oid, 'pg_database') as \"Description\" FROM pg_catalog.pg_database d WHERE datname = '${dbname}' AND pg_catalog.shobj_description(d.oid, 'pg_database') = '${comment}'",
83+
unless => "SELECT description FROM pg_description JOIN pg_database ON objoid = pg_database.oid WHERE datname = '${dbname}' AND description = '${comment}'",
84+
db => $dbname,
8485
}
8586
}
8687

0 commit comments

Comments
 (0)