Re: [PATCH v1] Add \echo_stderr to psql

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: [PATCH v1] Add \echo_stderr to psql
Дата
Msg-id 20190427171548.GM28936@fetter.org
обсуждение исходный текст
Ответ на Re: [PATCH v1] Add \echo_stderr to psql  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: [PATCH v1] Add \echo_stderr to psql  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers
On Sat, Apr 27, 2019 at 04:05:20PM +0200, Fabien COELHO wrote:
> 
> Hello David,
> 
> > Please find attached v2, name is now \warn.
> 
> Patch applies cleanly, compiles, "make check ok", although there are no
> tests. Doc gen ok.
> 
> Code is pretty straightforward.
> 
> I'd put the commands in alphabetical order (echo, qecho, warn) instead of
> e/w/q in the condition.

Done.

> 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.

> > 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.

Best,
David.
-- 
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Steve
Дата:
Сообщение: pg_ssl
Следующее
От: David Fetter
Дата:
Сообщение: Re: nRe: [PATCH v1] Show whether tables are logged in \dt+