Re: [HACKERS] Provide list of subscriptions and publications inpsql's completion - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: [HACKERS] Provide list of subscriptions and publications inpsql's completion
Date
Msg-id CAHGQGwHCa9vdu0fF=PuMPS2PP41=JyykwLAaEPfXbAEg9KwkSg@mail.gmail.com
Whole thread Raw
In response to [HACKERS] Provide list of subscriptions and publications in psql's completion  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: [HACKERS] Provide list of subscriptions and publications inpsql's completion  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
On Thu, Feb 2, 2017 at 2:48 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> Hi all,
>
> While testing a bit the logical replication facility, I have bumped on
> the fast that psql's completion does not show the list of things
> already created. Attached is a patch.

+#define Query_for_list_of_subscriptions \
+" SELECT pg_catalog.quote_ident(subname) "\
+"   FROM pg_catalog.pg_subscription "\
+"  WHERE substring(pg_catalog.quote_ident(subname),1,%d)='%s'"

Since non-superuser is not allowed to access to pg_subscription,
pg_stat_subscription should be accessed here, instead. Thought?

Regards,

-- 
Fujii Masao



pgsql-hackers by date:

Previous
From: Peter Moser
Date:
Subject: Re: [HACKERS] [PROPOSAL] Temporal query processing with range types
Next
From: Nico Williams
Date:
Subject: Re: [HACKERS] PoC: Make it possible to disallow WHERE-less UPDATEand DELETE