mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-22 10:38:30 +02:00
let operator fix publications without tables (#2722)
This commit is contained in:
@@ -46,7 +46,7 @@ const (
|
|||||||
createExtensionSQL = `CREATE EXTENSION IF NOT EXISTS "%s" SCHEMA "%s"`
|
createExtensionSQL = `CREATE EXTENSION IF NOT EXISTS "%s" SCHEMA "%s"`
|
||||||
alterExtensionSQL = `ALTER EXTENSION "%s" SET 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
|
FROM pg_publication p
|
||||||
LEFT JOIN pg_publication_tables pt ON pt.pubname = p.pubname
|
LEFT JOIN pg_publication_tables pt ON pt.pubname = p.pubname
|
||||||
WHERE p.pubowner = 'postgres'::regrole
|
WHERE p.pubowner = 'postgres'::regrole
|
||||||
|
|||||||
Reference in New Issue
Block a user