From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
---|---|
To: | David Fetter <david(at)fetter(dot)org> |
Cc: | Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PATCH v1] Add \echo_stderr to psql |
Date: | 2019-04-27 20:09:27 |
Message-ID: | alpine.DEB.2.21.1904272158120.29865@lancre |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello David,
About v3. Applies, compiles, global & local make check are ok. doc gen ok.
>> I'd put the commands in alphabetical order (echo, qecho, warn) instead of
>> e/w/q in the condition.
>
> Done.
Cannot see it:
+ else if (strcmp(cmd, "echo") == 0 || strcmp(cmd, "warn") == 0 || strcmp(cmd, "qecho") == 0)
>> The -n trick does not appear in the help lines, ISTM that it could fit, so
>> maybe it could be added, possibly something like:
>>
>> \echo [-n] [TEXT] write string to stdout, possibly without trailing newline
>>
>> and same for \warn and \qecho?
>
> Makes sense, but I put it there just for \echo to keep lines short.
I think that putting together the 3 echo variants help makes sense, but
maybe someone will object about breaking the abc order.
>>> How might we test this portably?
>>
>> Hmmm... TAP tests are expected to be portable. Attached a simple POC, which
>> could be extended to test many more things which are currently out of
>> coverage (src/bin/psql stuff is covered around 40% only).
>
> Thanks for putting this together. I've added this test, and agree that
> increasing coverage is important for another patch.
Yep.
--
Fabien.
From | Date | Subject | |
---|---|---|---|
Next Message | Fabien COELHO | 2019-04-27 20:38:50 | Re: nRe: [PATCH v1] Show whether tables are logged in \dt+ |
Previous Message | Tom Lane | 2019-04-27 19:05:26 | Re: Failure in contrib test _int on loach |