Re: Restore support for USE_ASSERT_CHECKING in extensions only - Mailing list pgsql-hackers

From David Rowley
Subject Re: Restore support for USE_ASSERT_CHECKING in extensions only
Date
Msg-id CAApHDvr-ZNkuiTpeKFNRcd_VmcRSYhUb96jT-1=Jo6kEZd2Ucg@mail.gmail.com
Whole thread Raw
In response to Re: Restore support for USE_ASSERT_CHECKING in extensions only  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Restore support for USE_ASSERT_CHECKING in extensions only
List pgsql-hackers
On Sat, 11 Jan 2025 at 12:32, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> David Rowley <dgrowleyml@gmail.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.

hmm, you got me confused. Maybe you missed that the extension will be
the one compiling the static inline TupleDescCompactAttr() function
and will use the macro instead?

I'm not grasping why this does not solve the problem.

David



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Restore support for USE_ASSERT_CHECKING in extensions only
Next
From: Tom Lane
Date:
Subject: Re: Restore support for USE_ASSERT_CHECKING in extensions only