Re: Improve tab completion for ALTER FUNCTION/PROCEDURE/ROUTINE

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Melih Mutlu <m(dot)melihmutlu(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Dong Wook Lee <sh95119(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Improve tab completion for ALTER FUNCTION/PROCEDURE/ROUTINE
Date: 2022-12-06 19:11:49
Message-ID: CALDaNm2vsdn0ihSvYCTMBZkMWqQZ1jLYD+o5vqKULM0vRnjwxg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 6 Dec 2022 at 20:42, Melih Mutlu <m(dot)melihmutlu(at)gmail(dot)com> wrote:
>
> Hi Vignesh,
>
> Looks like the patch needs a rebase.

Rebased

> Also one little suggestion:
>
>> + if (ends_with(prev_wd, ')'))
>> + COMPLETE_WITH(Alter_routine_options, "CALLED ON NULL INPUT",
>> + "RETURNS NULL ON NULL INPUT", "STRICT", "SUPPORT");
>
>
> What do you think about gathering FUNCTION options as you did with ROUTINE options.
> Something like the following would seem nicer, I think.
>
>> #define Alter_function_options \
>> Alter_routine_options, "CALLED ON NULL INPUT", \
>>
>> "RETURNS NULL ON NULL INPUT", "STRICT", "SUPPORT"

I did not make it as a macro for alter function options as it is used
only in one place whereas the others were required in more than one
place.
The attached v4 patch is rebased on top of HEAD.

Regards,
Vignesh

Attachment Content-Type Size
v4-0001-Tab-completion-for-ALTER-FUNCTION-PROCEDURE-ROUTI.patch application/x-patch 3.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2022-12-06 19:25:51 Re: wake up logical workers after ALTER SUBSCRIPTION
Previous Message Drouvot, Bertrand 2022-12-06 19:11:08 Re: Split index and table statistics into different types of stats