Re: Tab completion for CREATE TABLE ... AS

2023-11-15 Thread Michael Paquier
On Wed, Nov 15, 2023 at 05:26:58PM +0300, Gilles Darold wrote: > Right, I don't know how I have missed the sql-createtableas page in the > documentation. > > Patched v2 fixes the keyword list, I have also sorted by alphabetical order > the CREATE TABLE completion (AS was at the end of the list).

Re: Tab completion for CREATE TABLE ... AS

2023-11-15 Thread Gilles Darold
Le 15/11/2023 à 03:58, Michael Paquier a écrit : On Thu, Nov 02, 2023 at 07:27:02PM +0300, Gilles Darold wrote: Look like the tab completion for CREATE TABLE ... AS is not proposed. + /* Complete CREATE TABLE AS with list of keywords */ + else if (TailMatches("CREATE&quo

Re: Tab completion for CREATE TABLE ... AS

2023-11-14 Thread Michael Paquier
On Thu, Nov 02, 2023 at 07:27:02PM +0300, Gilles Darold wrote: > Look like the tab completion for CREATE TABLE ... AS is not > proposed. > > + /* Complete CREATE TABLE AS with list of keywords */ > + else if (TailMatches("CREATE

Re: Tab completion for CREATE TABLE ... AS

2023-11-09 Thread Jim Jones
Hi On 02.11.23 17:27, Gilles Darold wrote: > Hi, > > > Look like the tab completion for CREATE TABLE ... AS is not proposed. > > > gilles=# CREATE TABLE test > ( OF    PARTITION OF > >  The attached patch fix that and also propose the further com

Tab completion for CREATE TABLE ... AS

2023-11-02 Thread Gilles Darold
Hi, Look like the tab completion for CREATE TABLE ... AS is not proposed. gilles=# CREATE TABLE test ( OF    PARTITION OF  The attached patch fix that and also propose the further completion after the AS keyword. gilles=# CREATE TABLE test

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,

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

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

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, >

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

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

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

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",

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-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:

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

[PATCH] Improve tab completion for CREATE TABLE

2018-11-26 Thread Dagfinn Ilmari Mannsåker
Hi hackers, Please find attached a patch that adds the following tab completions for CREATE TABLE: - ( or PARTITION OF after the name - options after the column list - ON COMMIT actions for temp tables Regards, ilmari -- "The surreality of the universe tends towards a maximum" -- Skud's Law