| From: | Robert Haas <robertmhaas(at)gmail(dot)com> | 
|---|---|
| To: | Pierre Ducroquet <p(dot)psql(at)pinaraf(dot)info> | 
| Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com> | 
| Subject: | Re: Small patch for pg_basebackup argument parsing | 
| Date: | 2017-05-02 02:46:19 | 
| Message-ID: | CA+TgmoYS2jYr3f_hVQhQgWnJz+zYVGDn8xzfTrgHGDc+rPNz3A@mail.gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
On Sat, Apr 22, 2017 at 12:46 PM, Pierre Ducroquet <p(dot)psql(at)pinaraf(dot)info> wrote:
>> Here are the general guidelines about patch submission:
>> https://wiki.postgresql.org/wiki/Submitting_a_Patch
>> And the best thing would be to register it to the next commit fest so
>> as it does not get lost:
>> https://commitfest.postgresql.org/
>
> Thank you, I added an entry in the next commit fest.
Isn't (strtol_endptr != optarg + strlen(optarg))) just a really
inefficient way of writing (strtol_endptr != '\0')?
I would be inclined to write tests like if (standby_message_timeout <
0 || strtol_endptr != optarg + strlen(optarg)) in the other order;
that is, test strtol_endptr first, and only test the other conditions
if that test passes.
I would probably also just use endptr rather than strtol_endptr, for brevity.
-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Eisentraut | 2017-05-02 02:52:43 | Re: subscription worker doesn't start immediately on eabled | 
| Previous Message | Craig Ringer | 2017-05-02 02:45:40 | Re: CTE inlining |