Re: [PATCH] ALTER tab completion

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Ken Kato <katouknl(at)oss(dot)nttdata(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] ALTER tab completion
Date: 2021-11-26 06:33:44
Message-ID: YaB/yE4NiiCQqQBM@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 26, 2021 at 01:55:46PM +0900, Ken Kato wrote:
> I noticed that there are some tab completions missing for the following
> commands:
> -ALTER DEFAULT PRIVILEGES: missing FOR USER

FOR ROLE is an equivalent. That does not seem mandatory to me.

> -ALTER FOREIGN DATA WRAPPER: missing NO HANDLER, NO VALIDATOR

Okay for this one.

> -ALTER VIEW: no completion after ALTER COLUMN column_name

+ /* ALTER VIEW xxx ALTER yyy */
+ else if (Matches("ALTER", "VIEW", MatchAny, "ALTER", MatchAny))
+ COMPLETE_WITH("SET DEFAULT", "DROP DEFAULT");
It may be cleaner to group this one with "ALTER VIEW xxx ALTER yyy"
two blocks above.

> -ALTER TRANSFORM: no doc for ALTER TRANSFORM, so I excluded TRANSFORM from
> ALTER tab completion

Right.

> -ALTER SEQUENCE: missing AS
+ /* ALTER SEQUENCE <name> AS */
+ else if (TailMatches("ALTER", "SEQUENCE", MatchAny, "AS"))
+ COMPLETE_WITH("smallint", "integer", "bigint");
Re-quoting Horiguchi-san, that should be COMPLETE_WITH_CS() to keep
these completions in lower case.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2021-11-26 06:45:17 Re: row filtering for logical replication
Previous Message Peter Smith 2021-11-26 06:31:24 Re: row filtering for logical replication