From: | ilmari(at)ilmari(dot)org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) |
---|---|
To: | Artur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Re: [PATCH] Tab completion for ALTER TYPE … RENAME VALUE … |
Date: | 2016-11-08 13:53:26 |
Message-ID: | d8jvavynkmh.fsf@dalvik.ping.uio.no |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Artur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru> writes:
> Hello,
Hi Artur,
> 2016-09-12 16:16 GMT+03:00 Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>:
>>
>> I've added it to the 2016-11 commit fest:
>> https://commitfest.postgresql.org/11/795/
>>
>> - ilmari
>
> I've tested your patch.
[...]
> It seems that the patch can be commited without any fixes. So I marked
> it as "Ready for Committer".
Thank you very much. I just looked at the patch again and realised the
completion of "TO" after RENAME VALUE <name> can be merged with the one
for RENAME ATTRIBUTE <name>. Attached is an updated and patch, which
only differs from the previous one as follows:
$ interdiff 0001-Add-psql-tab-completion-for-ALTER-TYPE-RENAME-VALUE{,-v2}.patch
diff -u b/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
--- b/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -1918,11 +1918,8 @@ psql_completion(const char *text, int start, int end)
/* ALTER TYPE <foo> RENAME */
else if (Matches4("ALTER", "TYPE", MatchAny, "RENAME"))
COMPLETE_WITH_LIST3("ATTRIBUTE", "TO", "VALUE");
- /* ALTER TYPE xxx RENAME ATTRIBUTE yyy */
- else if (Matches6("ALTER", "TYPE", MatchAny, "RENAME", "ATTRIBUTE", MatchAny))
- COMPLETE_WITH_CONST("TO");
- /* ALTER TYPE xxx RENAME VALUE yyy */
- else if (Matches6("ALTER", "TYPE", MatchAny, "RENAME", "VALUE", MatchAny))
+ /* ALTER TYPE xxx RENAME (ATTRIBUTE|VALUE) yyy */
+ else if (Matches6("ALTER", "TYPE", MatchAny, "RENAME", "ATTRIBUTE|VALUE", MatchAny))
COMPLETE_WITH_CONST("TO");
/*
* If we have ALTER TYPE <sth> ALTER/DROP/RENAME ATTRIBUTE, provide list
Attachment | Content-Type | Size |
---|---|---|
0001-Add-psql-tab-completion-for-ALTER-TYPE-RENAME-VALUE-v2.patch | text/x-diff | 4.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2016-11-08 14:23:39 | Re: Improving RLS planning |
Previous Message | Michael Paquier | 2016-11-08 13:28:37 | Typo in event_trigger.c |