Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-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

pgsql-hackers by date

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

pgsql-committers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group