Re: Mark all GUC variable as PGDLLIMPORT

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Mark all GUC variable as PGDLLIMPORT
Дата
Msg-id 202108231540.llqacduza3nx@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: Mark all GUC variable as PGDLLIMPORT  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Mark all GUC variable as PGDLLIMPORT  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On 2021-Aug-23, Robert Haas wrote:

> It's also a bit unfair to say, well we have APIs for accessing GUC
> values. It's true that we do. But if the GUC variable is, say, a
> Boolean, you do not want your extension to call some function that
> does a bunch of shenanigans and returns a string so that you can then
> turn around and parse the string to recover the Boolean value. Even
> moreso if the value is an integer or a comma-separated list. You want
> to access the value as the system represents it internally, not
> duplicate the parsing logic in a way that is inefficient and
> bug-prone.

In that case, why not improve the API with functions that return the
values in some native datatype?  For scalars with native C types (int,
floats, Boolean etc) this is easy enough; I bet it'll solve 99% of the
problems or more.

-- 
Álvaro Herrera           39°49'30"S 73°17'W  —  https://www.EnterpriseDB.com/



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Queries that should be canceled will get stuck on secure_write function
Следующее
От: Tom Lane
Дата:
Сообщение: Regexp: observable bug from careless usage of zaptreesubs