Re: [HACKERS] \h tab-completion

2017-03-16 Thread Andreas Karlsson
On 03/17/2017 12:01 AM, Peter Eisentraut wrote: Committed with some tweaking. 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] \h tab-completion

2017-03-16 Thread Peter Eisentraut
On 3/15/17 22:46, Andreas Karlsson wrote: > On 03/01/2017 02:47 PM, Peter Eisentraut wrote: >> Instead of creating another copy of list_ALTER, let's use the >> words_after_create list and write a version of >> create_command_generator/drop_command_generator. > > Good idea. Here is a patch with tha

Re: [HACKERS] \h tab-completion

2017-03-15 Thread Andreas Karlsson
On 03/01/2017 02:47 PM, Peter Eisentraut wrote: Instead of creating another copy of list_ALTER, let's use the words_after_create list and write a version of create_command_generator/drop_command_generator. Good idea. Here is a patch with that. Andreas commit 7d691929f5814da87bb8a532e7dcfa2bd1

Re: [HACKERS] \h tab-completion

2017-03-13 Thread Andreas Karlsson
On 03/13/2017 03:56 PM, David Steele wrote: Do you know when you will have a new patch available for review that incorporates Peter's request? I believe I will find the time to finish it some time in a couple of days. Andreas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.

Re: [HACKERS] \h tab-completion

2017-03-13 Thread David Steele
Hi Andreas, On 3/1/17 8:47 AM, Peter Eisentraut wrote: > On 2/3/17 07:12, Andreas Karlsson wrote: >> On 01/25/2017 07:13 AM, Michael Paquier wrote: >>> What I think you should do is making the code path of >>> \\h smarter with some exceptions by using TailMatchesCS2() for ALTER. >>> There is as we

Re: [HACKERS] \h tab-completion

2017-03-01 Thread Kyotaro HORIGUCHI
Hello, At Wed, 1 Mar 2017 08:47:15 -0500, Peter Eisentraut wrote in > On 2/3/17 07:12, Andreas Karlsson wrote: > > On 01/25/2017 07:13 AM, Michael Paquier wrote: > >> What I think you should do is making the code path of > >> \\h smarter with some exceptions by using TailMatchesCS2() for ALTER

Re: [HACKERS] \h tab-completion

2017-03-01 Thread Peter Eisentraut
On 2/3/17 07:12, Andreas Karlsson wrote: > On 01/25/2017 07:13 AM, Michael Paquier wrote: >> What I think you should do is making the code path of >> \\h smarter with some exceptions by using TailMatchesCS2() for ALTER. >> There is as well the case of DROP commands that should be treated by >> the

Re: [HACKERS] \h tab-completion

2017-02-03 Thread Andreas Karlsson
On 01/25/2017 07:13 AM, Michael Paquier wrote: What I think you should do is making the code path of \\h smarter with some exceptions by using TailMatchesCS2() for ALTER. There is as well the case of DROP commands that should be treated by the way. Yes, I think that is correct approach. I have

Re: [HACKERS] \h tab-completion

2017-01-24 Thread Beena Emerson
On Wed, Jan 25, 2017 at 11:43 AM, Michael Paquier wrote: > On Wed, Jan 25, 2017 at 3:03 PM, Beena Emerson > wrote: > > I think the following change in tab-complete.c would do the trick. > > > > - else if (Matches1("ALTER")) > > + else if (TailMatches1("ALTER")) > > Nope. This change

Re: [HACKERS] \h tab-completion

2017-01-24 Thread Michael Paquier
On Wed, Jan 25, 2017 at 3:03 PM, Beena Emerson wrote: > I think the following change in tab-complete.c would do the trick. > > - else if (Matches1("ALTER")) > + else if (TailMatches1("ALTER")) Nope. This change breaks a bunch of subcommands, take for example ALTER TABLE foo ALTER, whi

Re: [HACKERS] \h tab-completion

2017-01-24 Thread Beena Emerson
On Wed, Jan 25, 2017 at 9:03 AM, Stephen Frost wrote: > All, > > I'm not really inclined to do it myself right now, but it'd be awful > nice if we had better table completion for \h. > > Right now, '\h alter' returns nothing, and '\h alter' returns a > *bunch* of stuff. > > Yet, we happily suppor

[HACKERS] \h tab-completion

2017-01-24 Thread Stephen Frost
All, I'm not really inclined to do it myself right now, but it'd be awful nice if we had better table completion for \h. Right now, '\h alter' returns nothing, and '\h alter' returns a *bunch* of stuff. Yet, we happily support '\h alter view' and friends, returning just the info relevant for tha