Re: [PATCH] Improve tab completion for CREATE TABLE

From: ilmari(at)ilmari(dot)org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=)
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Improve tab completion for CREATE TABLE
Date: 2018-12-20 00:02:52
Message-ID: d8j8t0lf4k3.fsf@dalvik.ping.uio.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Paquier <michael(at)paquier(dot)xyz> writes:

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

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

--
- Twitter seems more influential [than blogs] in the 'gets reported in
the mainstream press' sense at least. - Matt McLeod
- That'd be because the content of a tweet is easier to condense down
to a mainstream media article. - Calle Dybedahl

Attachment Content-Type Size
v4-0001-Tab-complete-more-options-for-CREATE-TABLE.patch text/x-diff 2.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-12-20 00:39:33 Re: Why are we PageInit'ing buffers in RelationAddExtraBlocks()?
Previous Message Michael Paquier 2018-12-19 23:44:08 Re: [PATCH] Improve tab completion for CREATE TABLE