Re: [PATCHES] mcxt.c

2003-09-08 Thread Gaetano Mendola
"Neil Conway" <[EMAIL PROTECTED]> wrote: > On Mon, 2003-09-08 at 11:09, Gaetano Mendola wrote: > > "Tom Lane" <[EMAIL PROTECTED]> wrote: > > > I see no value at all in an assert. The code will dump core just fine > > > with or without an assert ... > > > > Right but an assert can display informati

Re: [PATCHES] mcxt.c

2003-09-08 Thread Neil Conway
On Mon, 2003-09-08 at 11:09, Gaetano Mendola wrote: > "Tom Lane" <[EMAIL PROTECTED]> wrote: > > I see no value at all in an assert. The code will dump core just fine > > with or without an assert ... > > Right but an assert can display information about the file and line number > without debug t

Re: [PATCHES] mcxt.c

2003-09-08 Thread Gaetano Mendola
"Tom Lane" <[EMAIL PROTECTED]> wrote: > "Gaetano Mendola" <[EMAIL PROTECTED]> writes: > > "Tom Lane" <[EMAIL PROTECTED]> wrote: > >> This seems inappropriate to me. Are you going to suggest that every > >> routine that takes a pointer parameter needs to explicitly test for > >> null? > > > Of cou

Re: [PATCHES] mcxt.c

2003-09-08 Thread Gaetano Mendola
"Tom Lane" <[EMAIL PROTECTED]> wrote: > "Mendola Gaetano" <[EMAIL PROTECTED]> writes: > > A test for null string is missing here: > > > MemoryContextStrdup(MemoryContext context, const char *string) > > { > > char *nstr; > > - > > - if ( !string ) > > - { > > - elog(ERROR, "MemoryContextStrdup cal

Re: [PATCHES] mcxt.c

2003-09-07 Thread Tom Lane
"Mendola Gaetano" <[EMAIL PROTECTED]> writes: > A test for null string is missing here: > MemoryContextStrdup(MemoryContext context, const char *string) > { > char *nstr; > - > - if ( !string ) > - { > - elog(ERROR, "MemoryContextStrdup called with a NULL pointer"); > - return NULL; > - } This se