Re: Tab completion for CREATE TABLE ... AS

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

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 <name> AS with list of keywords */
>> + else if (TailMatches("CREATE", "TABLE", MatchAny, "AS") ||
>> + TailMatches("CREATE", "TEMP|TEMPORARY|UNLOGGED", "TABLE", MatchAny, "AS"))
> 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
> --
> Michael

Right, I don't know how I have missed the sql-createtableas page in the

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

It has also been re-based on current master.

Gilles Darold

Attachment Content-Type Size
fix-create-as-completion-v2.patch text/x-patch 1.3 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2023-11-15 15:03:23 Re: Fix documentation for pg_stat_statements JIT deform_counter
Previous Message Daniel Gustafsson 2023-11-15 14:25:22 Re: Allow tests to pass in OpenSSL FIPS mode