Re: Tab completion for CREATE TABLE ... AS

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Gilles Darold <gilles(at)darold(dot)net>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Tab completion for CREATE TABLE ... AS
Date: 2023-11-15 00:58:10
Message-ID: ZVQXogonOVe_9_2i@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2023-11-15 01:20:10 Fwd: Some deleted GUCs are still referred to
Previous Message Michael Paquier 2023-11-15 00:47:03 Re: Add new option 'all' to pg_stat_reset_shared()