Re: [WIP] pg_ping utility
От | Michael Paquier |
---|---|
Тема | Re: [WIP] pg_ping utility |
Дата | |
Msg-id | CAB7nPqR_C8N8Ajek5uMp8UmMQXEtz7mPBr3FkbnYsbx2dG-yYw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [WIP] pg_ping utility (Phil Sorber <phil@omniti.com>) |
Ответы |
Re: [WIP] pg_ping utility
|
Список | pgsql-hackers |
On Sun, Dec 2, 2012 at 5:56 AM, Phil Sorber <span dir="ltr"><<a href="mailto:phil@omniti.com" target="_blank">phil@omniti.com</a>></span>wrote:<br /><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:00 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Here is the updated patch. I renamed it, but usingv5 to stay consistent.<br /></blockquote></div><br />After looking at this patch, I found the following problems:<br/>- There are a couple of whitespaces still in the code, particularly at the end of those lines<br />+ const char *pguser = NULL; <br /> + const char *pgdbname = NULL; <br />- When describing the values that arereturned by pg_isready, it is awkward to refer to the returning values as plain integers as those values are part of anenum. You should add references to PQPING_OK, PQPING_REJECT, PQPING_NO_RESPONSE and PQPING_NO_ATTEMPT instead. Also addto reference links in the docs redirecting to them, with things of the type <xref linkend="libpq-pqpingparams-pqping-ok">or related.<br /> - Same thing with this example:<br />+ <para><br />+ Standard Usage:<br />+ <screen><br />+ <prompt>$</prompt> <userinput>pg_isready</userinput><br/>+ <prompt>$</prompt> <userinput>echo $?</userinput><br/> + <computeroutput>0</computeroutput><br />+ </screen><br />+ </para><brclear="all" />For the time being PQPING_OK returns 0 because it is on top of the enum PGPing, but this mightchange if for a reason or another the order of outputs is changed.<br /><br />Once those things are fixed, I think thiswill be ready for committer review as everybody here seem to agree with your approach.<br />-- <br />Michael Paquier<br/><a href="http://michael.otacoo.com" target="_blank">http://michael.otacoo.com</a><br />
В списке pgsql-hackers по дате отправления: