Re: [PATCH v1] Add \echo_stderr to psql
От | Fabien COELHO |
---|---|
Тема | Re: [PATCH v1] Add \echo_stderr to psql |
Дата | |
Msg-id | alpine.DEB.2.21.1904272158120.29865@lancre обсуждение исходный текст |
Ответ на | Re: [PATCH v1] Add \echo_stderr to psql (David Fetter <david@fetter.org>) |
Ответы |
[PATCH v4] Add \warn to psql
|
Список | 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.
В списке pgsql-hackers по дате отправления: