Re: Restore support for USE_ASSERT_CHECKING in extensions only

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: Andrew Kane <andrew(at)ankane(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Restore support for USE_ASSERT_CHECKING in extensions only
Date: 2025-01-10 23:32:03
Message-ID: 2714509.1736551923@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David Rowley <dgrowleyml(at)gmail(dot)com> writes:
> hmm, I didn't think of that scenario. I think since
> verify_compact_attribute() does nothing when USE_ASSERT_CHECKING isn't
> defined that we might as well define a ((void) 0) macro to avoid the
> undefined symbol error. That'll avoid the useless call in your debug
> builds.

No, this completely fails to address the problem. The concern is
that the extension has been compiled under USE_ASSERT_CHECKING,
so it will try to call the function. If the function's not there
in core, kaboom.

What you need to do is provide an empty no-op version of
verify_compact_attribute() in non-assert builds.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2025-01-10 23:40:46 Re: Restore support for USE_ASSERT_CHECKING in extensions only
Previous Message Melanie Plageman 2025-01-10 23:31:04 Re: Moving the vacuum GUCs' docs out of the Client Connection Defaults section