From cf17a9e207822cc56b006e07a70fac3f3d4cc1b4 Mon Sep 17 00:00:00 2001 From: Shi Yu Date: Sun, 9 Apr 2023 10:00:48 +0800 Subject: [PATCH v1] Avoid using pg_get_publication_tables() in create_subscription.sgml --- doc/src/sgml/ref/create_subscription.sgml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/src/sgml/ref/create_subscription.sgml b/doc/src/sgml/ref/create_subscription.sgml index 4c2db4c30d..3e210cfa77 100644 --- a/doc/src/sgml/ref/create_subscription.sgml +++ b/doc/src/sgml/ref/create_subscription.sgml @@ -497,11 +497,13 @@ CREATE SUBSCRIPTION subscription_name # substitute <pub-names> below with your publication name(s) to be queried SELECT DISTINCT N.nspname AS schemaname, C.relname AS tablename -FROM pg_publication P, - LATERAL pg_get_publication_tables(P.pubname) GPT - JOIN pg_subscription_rel PS ON (GPT.relid = PS.srrelid), - pg_class C JOIN pg_namespace N ON (N.oid = C.relnamespace) -WHERE C.oid = GPT.relid AND P.pubname IN (<pub-names>); +FROM pg_publication_tables PT, + pg_subscription_rel PS + JOIN pg_class C ON (C.oid = PS.srrelid) + JOIN pg_namespace N ON (N.oid = C.relnamespace) +WHERE N.nspname = PT.schemaname AND + C.relname = PT.tablename AND + PT.pubname IN (<pub-names>); -- 2.31.1