Re: Assert for frontend programs?

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Assert for frontend programs?
Date: 2012-12-16 14:56:01
Message-ID: 50CDE101.5000805@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 12/16/2012 01:29 AM, Peter Eisentraut wrote:
> On Fri, 2012-12-14 at 17:03 -0500, Tom Lane wrote:
>> Having the layer is a good thing, eg so that USE_ASSERT_CHECKING
>> can control it, or so that somebody can inject a different behavior
>> if they want.
> You could also (or at least additionally) map !USE_ASSERT_CHECKING to
> NDEBUG. This would also help with imported code that calls assert()
> directly.

We should probably do that for both frontend and backend code, no? That
would get rid of potential problems we already have like inet_net_pton.c
that I noted the other day.

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavan Deolasee 2012-12-16 15:27:09 Re: Set visibility map bit after HOT prune
Previous Message Andres Freund 2012-12-16 14:55:41 Re: logical decoding - GetOldestXmin