Re: [PATCH] Improve tab completion for CREATE TABLE

2018-12-23 Thread Dagfinn Ilmari Mannsåker
Michael Paquier writes: > On Sat, Dec 22, 2018 at 01:33:23PM +, Dagfinn Ilmari Mannsåker wrote: >> The CREATE and ALTER TABLE documentation calls them storage parameters, >> so I've gone for table_storage_parameters in the attached v2 patch. > > Sold. And committed. Thanks again! - ilmari

Re: [PATCH] Improve tab completion for CREATE TABLE

2018-12-22 Thread Michael Paquier
On Sat, Dec 22, 2018 at 01:33:23PM +, Dagfinn Ilmari Mannsåker wrote: > The CREATE and ALTER TABLE documentation calls them storage parameters, > so I've gone for table_storage_parameters in the attached v2 patch. Sold. And committed. >> Reordering them is a good idea, log_autovacuum_min_dur

Re: [PATCH] Improve tab completion for CREATE TABLE

2018-12-22 Thread Dagfinn Ilmari Mannsåker
Michael Paquier writes: > On Fri, Dec 21, 2018 at 03:14:36PM +, Dagfinn Ilmari Mannsåker wrote: >> Here's a patch that does this (and in passing alphabetises the list of >> options). > > Cool, thanks. The position of the option list is fine. However > list_TABLEOPTIONS is not a name consist

Re: [PATCH] Improve tab completion for CREATE TABLE

2018-12-21 Thread Michael Paquier
On Fri, Dec 21, 2018 at 03:14:36PM +, Dagfinn Ilmari Mannsåker wrote: > Here's a patch that does this (and in passing alphabetises the list of > options). Cool, thanks. The position of the option list is fine. However list_TABLEOPTIONS is not a name consistent with the surroundings. So we c

Re: [PATCH] Improve tab completion for CREATE TABLE

2018-12-21 Thread Michael Paquier
On Fri, Dec 21, 2018 at 01:57:40PM +, Dagfinn Ilmari Mannsåker wrote: > Yeah, because of that we can't do the obvious HeadMatches("CREATE", > "TABLE") && (TailMatches(...) || TailMatches(...) || ...). I believe > this would require extending the match syntax with regex-like grouping, > alterna

Re: [PATCH] Improve tab completion for CREATE TABLE

2018-12-21 Thread Dagfinn Ilmari Mannsåker
I wrote: > Another omission I just realised of is that it doesn't complete the list > of table storage options after after "WITH (". That should be fairly > easy to add (we already have the list for completing after ALTER TABLE > SET|RESET), but it's getting late here now. Here's a patch that do

Re: [PATCH] Improve tab completion for CREATE TABLE

2018-12-21 Thread Dagfinn Ilmari Mannsåker
Michael Paquier writes: > On Thu, Dec 20, 2018 at 12:02:52AM +, Dagfinn Ilmari Mannsåker wrote: >> Point, fixed in the attached v4. OTOH, as I mentioned in my other >> email, that runs into the problem that it won't complete the actions >> after e.g. "CREATE TEMP TABLE FOO () WITH () ON COM

Re: [PATCH] Improve tab completion for CREATE TABLE

2018-12-19 Thread Michael Paquier
On Thu, Dec 20, 2018 at 12:02:52AM +, Dagfinn Ilmari Mannsåker wrote: > Point, fixed in the attached v4. OTOH, as I mentioned in my other > email, that runs into the problem that it won't complete the actions > after e.g. "CREATE TEMP TABLE FOO () WITH () ON COMMIT". I am fine to do that lat

Re: [PATCH] Improve tab completion for CREATE TABLE

2018-12-19 Thread Dagfinn Ilmari Mannsåker
Michael Paquier writes: > On Wed, Dec 19, 2018 at 11:22:29PM +, Dagfinn Ilmari Mannsåker wrote: >> Michael Paquier writes: >>> + /* Complete ON COMMIT actions for temp tables */ >>> + else if (TailMatches("ON", "COMMIT")) >>> + COMPLETE_WITH("PRESERVE ROWS", "DELETE ROWS", "DROP");

Re: [PATCH] Improve tab completion for CREATE TABLE

2018-12-19 Thread Michael Paquier
On Wed, Dec 19, 2018 at 11:22:29PM +, Dagfinn Ilmari Mannsåker wrote: > Michael Paquier writes: >> + /* Complete ON COMMIT actions for temp tables */ >> + else if (TailMatches("ON", "COMMIT")) >> + COMPLETE_WITH("PRESERVE ROWS", "DELETE ROWS", "DROP"); >> >> This causes ON COMMIT to

Re: [PATCH] Improve tab completion for CREATE TABLE

2018-12-19 Thread Dagfinn Ilmari Mannsåker
ilm...@ilmari.org (Dagfinn Ilmari Mannsåker) writes: > Michael Paquier writes: > >> On Fri, Nov 30, 2018 at 03:44:38PM +, Dagfinn Ilmari Mannsåker wrote: >>> ilm...@ilmari.org (Dagfinn Ilmari Mannsåker) writes: Please find attached a patch that adds the following tab completions for

Re: [PATCH] Improve tab completion for CREATE TABLE

2018-12-19 Thread Dagfinn Ilmari Mannsåker
Michael Paquier writes: > On Fri, Nov 30, 2018 at 03:44:38PM +, Dagfinn Ilmari Mannsåker wrote: >> ilm...@ilmari.org (Dagfinn Ilmari Mannsåker) writes: >>> Please find attached a patch that adds the following tab completions for >>> CREATE TABLE: >> >> Added to the 2019-01 commitfest: https:

Re: [PATCH] Improve tab completion for CREATE TABLE

2018-12-18 Thread Michael Paquier
On Fri, Nov 30, 2018 at 03:44:38PM +, Dagfinn Ilmari Mannsåker wrote: > ilm...@ilmari.org (Dagfinn Ilmari Mannsåker) writes: >> Please find attached a patch that adds the following tab completions for >> CREATE TABLE: > > Added to the 2019-01 commitfest: https://commitfest.postgresql.org/21/18

Re: [PATCH] Improve tab completion for CREATE TABLE

2018-11-30 Thread Dagfinn Ilmari Mannsåker
ilm...@ilmari.org (Dagfinn Ilmari Mannsåker) writes: > Hi hackers, > > Please find attached a patch that adds the following tab completions for > CREATE TABLE: Added to the 2019-01 commitfest: https://commitfest.postgresql.org/21/1895/ - ilmari -- "A disappointingly low fraction of the human ra