Re: Tab complete for CREATE OR REPLACE TRIGGER statement

2020-11-19 Thread Tels
Hello Tom, On 2020-11-18 16:49, Tom Lane wrote: Tels writes: On 2020-11-18 06:06, Michael Paquier wrote: On Mon, Nov 16, 2020 at 10:14:10PM -0500, Tom Lane wrote: Agreed, I'm not trying to block this patch. Just wishing there were a better way. To me the code looks like a prime candidate

Re: Tab complete for CREATE OR REPLACE TRIGGER statement

2020-11-18 Thread Tom Lane
Tels writes: > On 2020-11-18 06:06, Michael Paquier wrote: >> On Mon, Nov 16, 2020 at 10:14:10PM -0500, Tom Lane wrote: >>> Agreed, I'm not trying to block this patch. Just wishing >>> there were a better way. > To me the code looks like a prime candidate for "data-driven" > refactoring. > It s

Re: Tab complete for CREATE OR REPLACE TRIGGER statement

2020-11-18 Thread Tels
On 2020-11-18 06:06, Michael Paquier wrote: On Mon, Nov 16, 2020 at 10:14:10PM -0500, Tom Lane wrote: Michael Paquier 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 t

RE: Tab complete for CREATE OR REPLACE TRIGGER statement

2020-11-17 Thread Shinoda, Noriyoshi (PN Japan FSI)
day, November 18, 2020 2:07 PM To: Tom Lane Cc: Shinoda, Noriyoshi (PN Japan FSI) ; pgsql-hackers@lists.postgresql.org Subject: Re: Tab complete for CREATE OR REPLACE TRIGGER statement On Mon, Nov 16, 2020 at 10:14:10PM -0500, Tom Lane wrote: > Michael Paquier writes: >> I don't thi

Re: Tab complete for CREATE OR REPLACE TRIGGER statement

2020-11-17 Thread Michael Paquier
On Mon, Nov 16, 2020 at 10:14:10PM -0500, Tom Lane wrote: > Michael Paquier 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

Re: Tab complete for CREATE OR REPLACE TRIGGER statement

2020-11-16 Thread Tom Lane
Michael Paquier 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. regards, tom lane

Re: Tab complete for CREATE OR REPLACE TRIGGER statement

2020-11-16 Thread Michael Paquier
On Mon, Nov 16, 2020 at 09:14:51PM -0500, Tom Lane wrote: > It's kind of depressing how repetitive the patch is. There's > probably not much to be done about that in the short run, but > it seems to point up the need to start thinking about how to > refactor tab-complete.c more thoroughly. Agreed

Re: Tab complete for CREATE OR REPLACE TRIGGER statement

2020-11-16 Thread Tom Lane
Michael Paquier writes: > On Mon, Nov 16, 2020 at 08:12:05AM +, Shinoda, Noriyoshi (PN Japan FSI) > wrote: >> Yesterday, OR REPLACE clause was provided to the CREATE TRIGGER >> statement, so I wrote a patch for tab completion for the psql >> command. > Thanks, the logic looks fine. I'll app

Re: Tab complete for CREATE OR REPLACE TRIGGER statement

2020-11-16 Thread Michael Paquier
On Mon, Nov 16, 2020 at 08:12:05AM +, Shinoda, Noriyoshi (PN Japan FSI) wrote: > Yesterday, OR REPLACE clause was provided to the CREATE TRIGGER > statement, so I wrote a patch for tab completion for the psql > command. Thanks, the logic looks fine. I'll apply if there are no objections. Pl