From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>, Rajeev rastogi <rajeev(dot)rastogi(at)huawei(dot)com>, Samrat Revagade <revagade(dot)samrat(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Fabrízio Mello <fabriziomello(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: psql: show only failed queries |
Date: | 2014-08-05 11:31:23 |
Message-ID: | CAHGQGwGJHBpY6NHW-mWh-+dZsQ5CQ+TTP53U7D8NNQsOknCZTA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jul 16, 2014 at 4:34 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>
>
>
> 2014-07-15 12:07 GMT+02:00 Fujii Masao <masao(dot)fujii(at)gmail(dot)com>:
>
>> On Tue, Jul 15, 2014 at 7:01 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
>> wrote:
>> >
>> >
>> >
>> > 2014-07-15 11:29 GMT+02:00 Fujii Masao <masao(dot)fujii(at)gmail(dot)com>:
>> >
>> >> On Thu, Jul 10, 2014 at 9:56 PM, Pavel Stehule
>> >> <pavel(dot)stehule(at)gmail(dot)com>
>> >> wrote:
>> >> > Hello
>> >> >
>> >> > here is a proposed patch - autocomplete for known psql variable
>> >> > content
>> >>
>> >> Even after applying the patch, the following psql variables were not
>> >> displayed
>> >> on the tab-completion of \set command.
>> >>
>> >> HISTFILE
>> >> HISTSIZE
>> >> HOST
>> >> IGNOREEOF
>> >> LASTOID
>> >>
>> >> I'm not sure if it's worth displaying all of them on the tab-completion
>> >> of
>> >> \set
>> >> because it seems strange to change some of them by \set command, for
>> >> example
>> >> HOST, though.
>> >
>> >
>> > For these variables are not default - so doesn't exist and cannot be
>> > completed by default.
>> >
>> > there are two fix:
>> >
>> > a) fix autocomplete source - preferred
>>
>> +1
>
>
> here is the patch
Thanks for the patch!
I got the following compiler warnings.
tab-complete.c:4155: warning: assignment discards qualifiers from
pointer target type
tab-complete.c:4166: warning: assignment discards qualifiers from
pointer target type
+ "FETCH_COUNT", "HISTCONTROL", "HISTFILE", "HISTSIZE", "HOST",
"IGNOREOFF",
Typo: IGNOREOFF -> IGNOREEOF
+ /* all psql known variables are included in list by default */
+ for (known_varname = known_varnames; *known_varname; known_varname++)
+ varnames[nvars++] = pg_strdup(*known_varname);
Don't we need to append both prefix and suffix to even known variables?
+ else if (strcmp(prev2_wd, "\\set") == 0)
+ {
+ if (strcmp(prev_wd, "AUTOCOMMIT") == 0)
ISTM that some psql variables like IGNOREEOF are not there. Why not?
Regards,
--
Fujii Masao
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2014-08-05 12:04:51 | Re: pg_receivexlog add synchronous mode |
Previous Message | Ashutosh Bapat | 2014-08-05 11:05:38 | Re: Introducing coarse grain parallelism by postgres_fdw. |