Re: Mark all GUC variable as PGDLLIMPORT

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Mark all GUC variable as PGDLLIMPORT
Date: 2021-08-24 08:28:24
Message-ID: ce21d787-44ac-4135-1ef8-2a3d1c5dc1cc@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 23.08.21 16:47, Julien Rouhaud wrote:
> On Mon, Aug 23, 2021 at 10:36 PM Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>>
>> So the problem is that extensions only _need_ to use that API on
>> Windows, so many initially don't, or that the API is too limited?
>
> The inconvenience with that API is that it's only returning c strings,
> so you gave to convert it back to the original datatype. That's
> probably why most of the extensions simply read from the original
> exposed variable rather than using the API, because they're usually
> written on Linux or similar, not because they want to mess up the
> stored value.

If there were an API, then in-core code should use it as well.

If, for example, an extension wanted to define a "float16" type, then it
should be able to access extra_float_digits in the *same way* as
float4out() and float8out() can access it. This is clearly not possible
today.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2021-08-24 08:37:59 Re: [BUG] wrong refresh when ALTER SUBSCRIPTION ADD/DROP PUBLICATION
Previous Message Konstantina Skovola 2021-08-24 08:25:53 [GSoC 2021 project summary] PL/Julia