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

From Peter Eisentraut
Subject Re: [HACKERS] Provide list of subscriptions and publications inpsql's completion
Date
Msg-id fb8e8918-b307-85b5-c1d2-182f56c80818@2ndquadrant.com
Whole thread Raw
In response to Re: [HACKERS] Provide list of subscriptions and publications inpsql's completion  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: [HACKERS] Provide list of subscriptions and publications inpsql's completion  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
On 2/2/17 12:48 PM, Fujii Masao wrote:
> +#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?

Arguably, you could leave it like that, assuming it fails cleanly for
nonsuperusers.  Nonsuperusers are not going to be able to run any
commands on subscriptions anyway, so there is little use for it.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] Enabling replication connections by default inpg_hba.conf
Next
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] Provide list of subscriptions and publications inpsql's completion