Skip to content

Commit

Permalink
let operator fix publications without tables (#2722)
Browse files Browse the repository at this point in the history
  • Loading branch information
FxKu authored Aug 9, 2024
1 parent 85b8058 commit d5a88f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cluster/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const (
createExtensionSQL = `CREATE EXTENSION IF NOT EXISTS "%s" SCHEMA "%s"`
alterExtensionSQL = `ALTER EXTENSION "%s" SET SCHEMA "%s"`

getPublicationsSQL = `SELECT p.pubname, string_agg(pt.schemaname || '.' || pt.tablename, ', ' ORDER BY pt.schemaname, pt.tablename)
getPublicationsSQL = `SELECT p.pubname, COALESCE(string_agg(pt.schemaname || '.' || pt.tablename, ', ' ORDER BY pt.schemaname, pt.tablename), '') AS pubtables
FROM pg_publication p
LEFT JOIN pg_publication_tables pt ON pt.pubname = p.pubname
WHERE p.pubowner = 'postgres'::regrole
Expand Down

0 comments on commit d5a88f5

Please sign in to comment.