Re: tab-completion debug print

2019-02-01 Thread Michael Paquier
On Fri, Feb 01, 2019 at 11:07:02AM +0900, Michael Paquier wrote: > On Thu, Jan 31, 2019 at 04:53:49AM -0800, Andres Freund wrote: > > My impression is that this patch ought to marked as rejected? > > I may be missing something, but I have the same impression. Re-reading the thread I think that's

Re: tab-completion debug print

2019-01-31 Thread Michael Paquier
On Thu, Jan 31, 2019 at 04:53:49AM -0800, Andres Freund wrote: > My impression is that this patch ought to marked as rejected? I may be missing something, but I have the same impression. -- Michael signature.asc Description: PGP signature

Re: tab-completion debug print

2019-01-31 Thread Andres Freund
Hi, On 2018-12-14 08:45:49 +0100, Peter Eisentraut wrote: > On 14/12/2018 06:41, David Fetter wrote: > > There are problems tab completion, e.g. its catalog queries, could > > cause in production that would be difficult to simulate elsewhere. > > Where are all these reports of tab completion quer

Re: tab-completion debug print

2018-12-13 Thread Peter Eisentraut
On 14/12/2018 06:41, David Fetter wrote: > There are problems tab completion, e.g. its catalog queries, could > cause in production that would be difficult to simulate elsewhere. Where are all these reports of tab completion query problems that we are building elaborate infrastructure to diagnose?

Re: tab-completion debug print

2018-12-13 Thread David Fetter
On Fri, Dec 14, 2018 at 12:23:17AM -0500, Tom Lane wrote: > David Fetter writes: > > On Thu, Dec 13, 2018 at 07:43:52PM +0100, Peter Eisentraut wrote: > >> I'm not sure that this should be a run-time option. > > > Given the often onerous givens of installing new software on > > production machine

Re: tab-completion debug print

2018-12-13 Thread Tom Lane
David Fetter writes: > On Thu, Dec 13, 2018 at 07:43:52PM +0100, Peter Eisentraut wrote: >> I'm not sure that this should be a run-time option. > Given the often onerous givens of installing new software on > production machines, I'm thinking it actually should be. What's that have to do with it

Re: tab-completion debug print

2018-12-13 Thread David Fetter
On Thu, Dec 13, 2018 at 07:43:52PM +0100, Peter Eisentraut wrote: > On 13/12/2018 12:07, Kyotaro HORIGUCHI wrote: > > - v6-0002-Add-psql-g-option-to-control-debug-print.patch > > > > Applies on top of 0001. Code is always active, -g addition to > > -L activates debug print into the log file. I

Re: tab-completion debug print

2018-12-13 Thread Peter Eisentraut
On 13/12/2018 12:07, Kyotaro HORIGUCHI wrote: > - v6-0002-Add-psql-g-option-to-control-debug-print.patch > > Applies on top of 0001. Code is always active, -g addition to > -L activates debug print into the log file. If only -g is > specified it is forcibly turned off. > > > $ psql postgr

Re: tab-completion debug print

2018-12-13 Thread Kyotaro HORIGUCHI
Hello. At Wed, 28 Nov 2018 17:28:39 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20181128.172839.242071562.horiguchi.kyot...@lab.ntt.co.jp> > I'm not sure how much it is wanted but it's easy to do. Using > psql variable doesn't seem to make sense since the debug print > (currently)

Re: tab-completion debug print

2018-11-28 Thread Kyotaro HORIGUCHI
ntf(pset.logfile, "%s\"%s\"", i ? ", " : "", list[i]); + fprintf(pset.logfile, ")%s\n", list ? "": "]"); + fflush(pset.logfile); + } + + return list; +} +#endif + /* word break characters */ #define WORD_BREAKS "\t\n@$><

Re: tab-completion debug print

2018-11-27 Thread David Fetter
On Tue, Nov 27, 2018 at 03:54:55PM -0500, Tom Lane wrote: > David Fetter writes: > > Do we still want this as a compile-time option, or does it make more > > sense as a run-time option? I'm thinking that with \L, it might make > > sense as a run-time option. > > This seems to me to be strictly a

Re: tab-completion debug print

2018-11-27 Thread Tom Lane
David Fetter writes: > Do we still want this as a compile-time option, or does it make more > sense as a run-time option? I'm thinking that with \L, it might make > sense as a run-time option. This seems to me to be strictly a developer debugging feature. regards, tom lan

Re: tab-completion debug print

2018-11-27 Thread David Fetter
On Tue, Nov 27, 2018 at 06:06:06PM +0900, Kyotaro HORIGUCHI wrote: > Hello. > > At Mon, 26 Nov 2018 07:08:53 +0100, David Fetter wrote in > <20181126060853.gp...@fetter.org> > > On Sun, Nov 25, 2018 at 11:21:51PM -0500, Tom Lane wrote: > > > Kyotaro HORIGUCHI writes: > > > >> On Fri, Nov 23, 20

Re: tab-completion debug print

2018-11-27 Thread Kyotaro HORIGUCHI
Hello. At Mon, 26 Nov 2018 07:08:53 +0100, David Fetter wrote in <20181126060853.gp...@fetter.org> > On Sun, Nov 25, 2018 at 11:21:51PM -0500, Tom Lane wrote: > > Kyotaro HORIGUCHI writes: > > >> On Fri, Nov 23, 2018 at 04:32:31PM -0500, Tom Lane wrote: > > >>> Hm. I can see the value of instr

Re: tab-completion debug print

2018-11-25 Thread David Fetter
On Mon, Nov 26, 2018 at 12:23:16PM +0900, Kyotaro HORIGUCHI wrote: > Thank you for the comments. > > At Sun, 25 Nov 2018 01:17:27 +0100, David Fetter wrote in > <20181125001727.gm...@fetter.org> > > On Fri, Nov 23, 2018 at 04:32:31PM -0500, Tom Lane wrote: > > > Hm. I can see the value of instr

Re: tab-completion debug print

2018-11-25 Thread David Fetter
On Sun, Nov 25, 2018 at 11:21:51PM -0500, Tom Lane wrote: > Kyotaro HORIGUCHI writes: > >> On Fri, Nov 23, 2018 at 04:32:31PM -0500, Tom Lane wrote: > >>> Hm. I can see the value of instrumenting tab-complete when you're trying > >>> to debug why it did something, but this output format seems pre

Re: tab-completion debug print

2018-11-25 Thread Tom Lane
Kyotaro HORIGUCHI writes: >> On Fri, Nov 23, 2018 at 04:32:31PM -0500, Tom Lane wrote: >>> Hm. I can see the value of instrumenting tab-complete when you're trying >>> to debug why it did something, but this output format seems pretty terse >>> and unreadable. > The reason for the minimal output

Re: tab-completion debug print

2018-11-25 Thread Kyotaro HORIGUCHI
c char **completion_debug(int line, + const char *text, rl_compentry_func_t *func) +{ + char **list = org_completion_matches(text, func); + + /* + * enclose empty list with brackets since it is an intermediate state + * which is immediately followed by a non-empty list. + */ + fpri

Re: tab-completion debug print

2018-11-24 Thread David Fetter
On Fri, Nov 23, 2018 at 04:32:31PM -0500, Tom Lane wrote: > Kyotaro HORIGUCHI writes: > > I was reminded that I was often annoyed with identifying the code > > that made a word-completion, by hearing the same complaint from a > > collegue of mine just now. > > Something like the attached that twea

Re: tab-completion debug print

2018-11-23 Thread Tom Lane
Kyotaro HORIGUCHI writes: > I was reminded that I was often annoyed with identifying the code > that made a word-completion, by hearing the same complaint from a > collegue of mine just now. > Something like the attached that tweaks completion_matches calls > lets psql emit the line number where a

tab-completion debug print

2018-11-22 Thread Kyotaro HORIGUCHI
Hello. I was reminded that I was often annoyed with identifying the code that made a word-completion, by hearing the same complaint from a collegue of mine just now. Something like the attached that tweaks completion_matches calls lets psql emit the line number where a word-completion happens. Th