Re: bug in COPY - Mailing list pgsql-hackers

From Tom Lane
Subject Re: bug in COPY
Date
Msg-id 3431.1030479671@sss.pgh.pa.us
Whole thread Raw
In response to Re: bug in COPY  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: bug in COPY  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: bug in COPY  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
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.

> I removed them both '!'.

If you like.  But the two conditions are not comparable.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Open 7.3 items
Next
From: Bruce Momjian
Date:
Subject: Re: bug in COPY