Re: Small memory fixes for pg_createsubcriber - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Small memory fixes for pg_createsubcriber
Date
Msg-id 3355447.1739380997@sss.pgh.pa.us
Whole thread Raw
In response to Re: Small memory fixes for pg_createsubcriber  (Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>)
Responses Re: Small memory fixes for pg_createsubcriber
List pgsql-hackers
=?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= <ilmari@ilmari.org> writes:
> Andres Freund <andres@anarazel.de> writes:
>> Particularly for something like libpq it's not quitetrivial to add
>> attributes like this, of course. We can't even depend on pg_config.h.
>> One way would be to define them in libpq-fe.h, guarded by an #ifdef, that's
>> "armed" by a commandline -D flag, if the compiler is supported?

> Does it need a -D flag, wouldn't __has_attribute(malloc) (with the
> fallback definition in c.h) be enough?

libpq-fe.h has to be compilable by application code that has never
heard of pg_config.h let alone c.h, so we'd have to tread carefully
about not breaking that property.  But it seems like this would be
worth looking into.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: TAP test command_fails versus command_fails_like
Next
From: Dagfinn Ilmari Mannsåker
Date:
Subject: Re: Small memory fixes for pg_createsubcriber