Re: pgsql: Move Assert() definitions to c.h

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Move Assert() definitions to c.h
Date: 2013-02-01 22:44:42
Message-ID: 20130201224442.GH4918@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Tom Lane wrote:
> Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> > Move Assert() definitions to c.h
>
> This seems a bit odd. Why didn't you move all of postgres.h's section 3
> into the new section in c.h? The couple of declarations you left there
> are neither useful nor intelligible on their own.

Hmm, true, I didn't consider that. Will fix.

> Also, I think there's a typo here:
>
> +#else /* USE_ASSERT_CHECKING && FRONTEND */
>
> Should be
>
> +#else /* USE_ASSERT_CHECKING && !FRONTEND */
>
> no?

This bit I did consider. It wasn't clear to me whether those comments
mean that the condition spelled out in the comment holds for the lines
below, or that they hold for the lines above. Note the comment after
the #endif holds for the lines above it.

After searching for precedent, I found one in ip.c and it seems to
support what you say.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2013-02-01 22:55:43 Re: pgsql: Move Assert() definitions to c.h
Previous Message Tom Lane 2013-02-01 22:28:00 Re: pgsql: Move Assert() definitions to c.h