Re: bug in COPY - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: bug in COPY
Date
Msg-id 200208272024.g7RKOmL10918@candle.pha.pa.us
Whole thread Raw
In response to Re: bug in COPY  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: bug in COPY  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Tom Lane wrote:
> >> The exclamation point seems inappropriate.  Perhaps "zero-length input"
> >> would be better than "string" also.
> 
> > I copied the other test case:
> 
> >     if (s == (char *) NULL)
> >         elog(ERROR, "pg_atoi: NULL pointer!"); 
> 
> Well, the NULL-pointer test might equally well be coded as an Assert:
> it's to catch backend coding errors, not cases of incorrect user input.
> So the exclamation point there didn't bother me.


You really think it should be Assert?  I don't mind opening the chance
to throw an error for bad input, but are you sure that a NULL should
never get there?

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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: bug in COPY
Next
From: Bruce Momjian
Date:
Subject: Re: bug in COPY