Re: [COMMITTERS] pgsql: Add comments about why errno is

From: Neil Conway <neilc(at)samurai(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [COMMITTERS] pgsql: Add comments about why errno is
Date: 2005-12-01 22:19:07
Message-ID: 1133475547.16064.3.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Thu, 2005-12-01 at 16:38 -0500, Bruce Momjian wrote:
> Maybe it should be:
>
> errno = 0; /* Allow unconditional errno check */

I think any solution that involves adding more duplication at each
strtol() callsite is not great ("Don't Repeat Yourself"). I'd still like
to see this refactored into a separate function, as I suggested on
-patches. If people would like to see a detailed explanation of the
interaction between strtol() and errno, a header comment to pg_strtol()
seems a good place to put it. IMO that is better than copying and
pasting a cryptic one-line comment to each and every callsite of
strtol().

-Neil

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2005-12-01 22:30:43 pgsql: Add all heap page rows visible bitmap idea: < the heap.
Previous Message Bruce Momjian 2005-12-01 22:12:36 pgsql: Add MERGE TODO.detail: > [merge] 378a380 > [merge]

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2005-12-01 22:33:32 Re: Improving count(*)
Previous Message Bruce Momjian 2005-12-01 21:38:56 Re: [COMMITTERS] pgsql: Add comments about why errno is set