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 CAHGQGwFfUbUKp-q0UmW40wYj4rkkgzOfkEQH51DS+0uPX1sKeQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Provide list of subscriptions and publications inpsql's completion  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: [HACKERS] Provide list of subscriptions and publications inpsql's completion  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
On Sat, Feb 4, 2017 at 9:01 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> On Fri, Feb 3, 2017 at 3:56 AM, Peter Eisentraut
> <peter.eisentraut@2ndquadrant.com> wrote:
>> On 2/2/17 12:48 AM, Michael Paquier 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'"
>>
>> This query should also be qualified by current database.
>
> Indeed. Here is an updated patch.

With this patch, when normal users type TAB after SUBSCRIPTION,
they got "permission denied" error. I don't think that's acceptable.

In "CREATE SUBSCRIPTION ... PUBLICATION" and "ALTER SUBSCRIPTION ... SET
PUBLICATION" cases, the publication defined in the publisher side should be
specified. But, with this patch, the tab-completion for PUBLICATION shows
the publications defined in local server (ie, subscriber side in those cases).
This might be confusing.

Regards,

-- 
Fujii Masao



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: [HACKERS] Provide list of subscriptions and publications inpsql's completion
Next
From: Petr Jelinek
Date:
Subject: Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION