Skip to content
Snippets Groups Projects
Unverified Commit d5a88f57 authored by Felix Kunde's avatar Felix Kunde Committed by GitHub
Browse files

let operator fix publications without tables (#2722)

parent 85b80580
Branches
Tags
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment