Re: [HACKERS] Improved tab completion for FDW DDL

2016-01-25 Thread Andreas Karlsson
On 01/23/2016 01:03 PM, Peter Eisentraut wrote: committed Thanks! Andreas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Improved tab completion for FDW DDL

2016-01-23 Thread Peter Eisentraut
On 1/18/16 8:36 PM, Andreas Karlsson wrote: > On 01/11/2016 02:39 AM, Peter Eisentraut wrote: >> The second part is not necessary, because there is already code that >> completes FDW names after "FOREIGN DATA WRAPPER". So this already works. > > Good spot, thanks. I have no idea why I did not

Re: [HACKERS] Improved tab completion for FDW DDL

2016-01-18 Thread Andreas Karlsson
On 01/11/2016 02:39 AM, Peter Eisentraut wrote: The second part is not necessary, because there is already code that completes FDW names after "FOREIGN DATA WRAPPER". So this already works. Good spot, thanks. I have no idea why I did not think it worked. Maybe it just did not work in 9.2 and

Re: [HACKERS] Improved tab completion for FDW DDL

2016-01-10 Thread Peter Eisentraut
The second part is not necessary, because there is already code that completes FDW names after "FOREIGN DATA WRAPPER". So this already works. The other two parts are valid improvements, but they should be done consistently across commands. So please - Also complete RENAME TO in ALTER FOREIGN

Re: [HACKERS] Improved tab completion for FDW DDL

2016-01-07 Thread Tom Lane
Andreas Karlsson 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"

Re: [HACKERS] Improved tab completion for FDW DDL

2016-01-06 Thread Andreas Karlsson
On 01/04/2016 07:26 AM, Michael Paquier wrote: You may want to use Matches() instead of TailMatches() for performance reasons. Here is an updated version which uses Matches(). Andreas diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 4d2bee1..34dabc5 100644 ---

Re: [HACKERS] Improved tab completion for FDW DDL

2016-01-04 Thread Andreas Karlsson
On 01/04/2016 07:26 AM, Michael Paquier wrote: You may want to use Matches() instead of TailMatches() for performance reasons. Probably, but if so should we not also change the surrounding rules to also use Matches()? I imitated the surrounding code to keep code consistency and avoid errors.

Re: [HACKERS] Improved tab completion for FDW DDL

2016-01-04 Thread Tom Lane
Andreas Karlsson writes: > I thought I saw some patch from you changing many of the rules from > TailMatches() to Matches(). Perhaps I should just update my patch after > your patch has been applied. Yes, I think it's important to get that set of patches from Michael into

Re: [HACKERS] Improved tab completion for FDW DDL

2016-01-03 Thread David Fetter
On Wed, Dec 30, 2015 at 01:21:06PM +0100, Andreas Karlsson wrote: > Hi, > > Here is a patch which adds the below missing tab completions for the FDW DDL > commands. I noticed these were missing while playing around with FDWs a > while ago. > > "ALTER SERVER " with "RENAME TO" > "CREATE SERVER

Re: [HACKERS] Improved tab completion for FDW DDL

2016-01-03 Thread Michael Paquier
On Wed, Dec 30, 2015 at 9:21 PM, Andreas Karlsson wrote: > Hi, > > Here is a patch which adds the below missing tab completions for the FDW DDL > commands. I noticed these were missing while playing around with FDWs a > while ago. > > "ALTER SERVER " with "RENAME TO" > "CREATE