Re: mcxt.c

From: "Gaetano Mendola" <mendola(at)bigfoot(dot)com>
To: <pgsql-patches(at)postgresql(dot)org>
Cc: "Neil Conway" <neilc(at)samurai(dot)com>
Subject: Re: mcxt.c
Date: 2003-09-08 21:07:44
Message-ID: 00f001c3764e$26430940$4c720b3e@mm.eutelsat.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

"Neil Conway" <neilc(at)samurai(dot)com> wrote:
> On Mon, 2003-09-08 at 11:09, Gaetano Mendola wrote:
> > "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> 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 the application
>
> I think the percentage of deployments that enable assertions (which
> causes a runtime performance hit) but NOT debugging info (which does
> not) is pretty small.
>
> ISTM that checking for non-NULL pointers is pretty pointless: just
> because a pointer happens to be non-NULL doesn't mean it is any more
> valid, and dereferencing a NULL pointer is easy enough to track down in
> any case.

I'm not speaking only about to test if pointer is null or not but also do
some
assert to better understand wich condition shall be verified in some part of
the
code also to have clear what is going on inside code that may be after years
and years is not clear anymore.

May be I'm not clear enough.
Please tell me when and were an assert shall be used.

Regards
Gaetano Mendola

In response to

  • Re: mcxt.c at 2003-09-08 18:32:33 from Neil Conway

Browse pgsql-hackers by date

  From Date Subject
Next Message Chris Gamache 2003-09-08 21:12:54 undefine currval()
Previous Message Tom Lane 2003-09-08 21:06:41 Re: constraint modification on todo list

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2003-09-08 21:19:13 Re: ISO 8601 "Time Intervals" of the "format with time-unit deignators"
Previous Message Bruce Momjian 2003-09-08 21:05:14 Re: ISO 8601 "Time Intervals" of the "format with time-unit