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

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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: 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 set
Date: 2005-12-01 21:38:56
Message-ID: 200512012138.jB1Lcu400933@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
Martijn van Oosterhout wrote:
-- Start of PGP signed section.
> On Thu, Dec 01, 2005 at 04:12:30PM -0500, Bruce Momjian wrote:
> > Well, there seems to be enough confusion, even in this email list, that
> > identifying _why_ errno is being cleared is a good idea.
> > 
> > I modified it to:
> > 
> >         errno = 0;  /* avoid having to check the result for failure */
> 
> I don't know about others but I find that wording ambiguous. Like it's
> saying that once you've done that it can't fail. I think I'd prefer
> something like:
> 
> errno = 0;   /* Make error condition detectable */
> 
> or even
> 
> errno = 0;   /* clear pending errors */
> 
> or
> 
> errno = 0;   /* clear prior detected errors */

Maybe it should be:

	errno = 0;	/* Allow unconditional errno check */

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

Responses

pgsql-hackers by date

Next:From: Neil ConwayDate: 2005-12-01 22:19:07
Subject: Re: [COMMITTERS] pgsql: Add comments about why errno is
Previous:From: Bruce MomjianDate: 2005-12-01 21:36:34
Subject: Re: SHOW ALL output too wide

pgsql-committers by date

Next:From: James William PyeDate: 2005-12-01 22:01:31
Subject: python - be: Implement text's sequence interface.
Previous:From: Martijn van OosterhoutDate: 2005-12-01 21:31:12
Subject: Re: [COMMITTERS] pgsql: Add comments about why errno is set to zero.

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