Re: Tab complete for CREATE OR REPLACE TRIGGER statement

From: Tels <nospam-pg-abuse(at)bloodgate(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Shinoda, Noriyoshi (PN Japan FSI)" <noriyoshi(dot)shinoda(at)hpe(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Tab complete for CREATE OR REPLACE TRIGGER statement
Date: 2020-11-18 15:25:44
Message-ID: 76b3f3407a6b1a1f0cb5a27ec7d35da5@bloodgate.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020-11-18 06:06, Michael Paquier wrote:
> On Mon, Nov 16, 2020 at 10:14:10PM -0500, Tom Lane wrote:
>> Michael Paquier <michael(at)paquier(dot)xyz> writes:
>>> I don't think that this is a requirement for this thread, though.
>>
>> Agreed, I'm not trying to block this patch. Just wishing
>> there were a better way.
>
> Okay. I have tweaked a couple of things in the patch and applied it.
> I am wondering if libreadline gives the possibility to implement an
> optional grouping of words to complete, but diving into its
> documentation I have not found something that we could use.

To me the code looks like a prime candidate for "data-driven"
refactoring.

It should be redone as generic code that reads a table of rules with
params and then checks and applies each. Thus the repetitive code would
be replaced by a bit more generic code and a lot of code-free data.

--
Best regards,

Tels

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Borisov 2020-11-18 15:27:20 Re: Is postgres ready for 2038?
Previous Message Stephen Frost 2020-11-18 14:46:30 Re: proposal: possibility to read dumped table's name from file