Re: [PATCH] Improve tab completion for CREATE TABLE

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Improve tab completion for CREATE TABLE
Date: 2018-12-19 23:44:08
Message-ID: 20181219234408.GD27104@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Dec 19, 2018 at 11:22:29PM +0000, Dagfinn Ilmari Mannsåker wrote:
> Michael Paquier <michael(at)paquier(dot)xyz> 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 show up for permanent and unlogged tables.
>
> No, this is for completing _after_ ON COMMIT, which is only suggested by
> the clause for temporary tables above.

If a user types "CREATE TABLE foo () ON COMMIT" by himself and then asks
for tab completion then he would get the suggestion, which is incorrect?
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?= 2018-12-20 00:02:52 Re: [PATCH] Improve tab completion for CREATE TABLE
Previous Message Andres Freund 2018-12-19 23:43:18 Re: A tidbit I spotted while playing in tablecmds.c