Re: Provide list of subscriptions and publications in psql's completion

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Provide list of subscriptions and publications in psql's completion
Date: 2017-02-14 18:18:16
Message-ID: 9ada39f5-7832-05f9-c146-4d53c2926284@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2/13/17 9:36 PM, Michael Paquier wrote:
>> Probably I failed to get Peter's point... Anyway IMO that we can expose all the
>> columns except the sensitive information (i.e., subconninfo field)
>> in pg_subscription to even non-superusers. Then we can use pg_subscription
>> for the tab-completion for ALTER/DROP SUBSCRIPTION.
> To be honest, I find subconninfo quite useful to check where a
> subscription is getting its changes from, so I'd rather not touch it.
> It looks as well a bit overkill to just create a new view on an object
> type non-superusers cannot even use... There are already 1 view and 1
> system catalog related to it, so I'd be of the opinion to let it fail
> silently with a permission error and keep it as an empty list for
> them.

Why not do what we do for pg_stat_activity.current_query and leave it
NULL for non-SU?

Even better would be if we could simply strip out password info.
Presumably we already know how to parse the contents, so I'd think that
shouldn't be that difficult.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2017-02-14 18:21:58 Re: log_autovacuum_min_duration doesn't log VACUUMs
Previous Message Jim Nasby 2017-02-14 18:13:51 Add checklist item for psql completion to commitfest review