Re: Tab completion for CREATE TABLE ... AS - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Tab completion for CREATE TABLE ... AS
Date
Msg-id ZVQXogonOVe_9_2i@paquier.xyz
Whole thread Raw
In response to Tab completion for CREATE TABLE ... AS  (Gilles Darold <gilles@darold.net>)
Responses Re: Tab completion for CREATE TABLE ... AS
List pgsql-hackers
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 <name> AS with list of keywords */
> +    else if (TailMatches("CREATE", "TABLE", MatchAny, "AS") ||
> +             TailMatches("CREATE", "TEMP|TEMPORARY|UNLOGGED", "TABLE", MatchAny, "AS"))
> +        COMPLETE_WITH("SELECT", "WITH");

There is a bit more than SELECT and WITH as possible query for a CTAS.
How about VALUES, TABLE or even EXECUTE (itself able to handle a
SELECT, TABLE or VALUES)?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Add new option 'all' to pg_stat_reset_shared()
Next
From: zhihuifan1213@163.com
Date:
Subject: Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)