Re: Tab completion for CREATE TABLE ... AS
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Gilles Darold <gilles@darold.net>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-11-15T00:58:10Z
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
Commits
-
psql: Add some completion support for CREATE TABLE .. AS
- 816f10564a86 17.0 landed