Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster