| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
|---|---|
| To: | Andreas Karlsson <andreas(at)proxel(dot)se> | 
| Cc: | David Fetter <david(at)fetter(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | Re: Improved tab completion for FDW DDL | 
| Date: | 2016-01-07 14:33:25 | 
| Message-ID: | 11619.1452177205@sss.pgh.pa.us | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
Andreas Karlsson <andreas(at)proxel(dot)se> writes:
> On 01/04/2016 01:09 AM, David Fetter wrote:
>> On Wed, Dec 30, 2015 at 01:21:06PM +0100, Andreas Karlsson wrote:
>>> Another completion which is currently missing but I am not sure if we should
>>> add or not is completing "ALTER|CREATE|DROP USER" with "MAPPING FOR", but
>>> since it might interfere with completing to username for "ALTER|DROP USER" I
>>> am not sure we want it. What do you think?
>> Is there a way to require some reasonable chunk--say, one that's
>> disambiguated from the name any known ROLE with LOGIN--of MAPPING
>> before completing with MAPPING FOR?  I confess to not knowing how the
>> new system works in enough detail to know that off the top of my head.
> No, and while it would not be too hard to build it would not be worth 
> doing just for this use case.
The way we've solved other similar cases would translate like this:
instead of the "query for user names" just returning user names, add
on "UNION 'MAPPING FOR'".  So if you do
# alter user <TAB>
where you're now offered
alice joe postgres
you'd instead get
alice joe postgres MAPPING FOR
Dunno if it's worth the trouble though.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jim Nasby | 2016-01-07 14:37:29 | Re: Very confusing installcheck behavior with PGXS | 
| Previous Message | Andres Freund | 2016-01-07 13:53:24 | Re: checkpointer continuous flushing |