Global variable/memory context for PostgreSQL functions

Поиск
Список
Период
Сортировка
От Sajti Zsolt Zoltán
Тема Global variable/memory context for PostgreSQL functions
Дата
Msg-id DB9PR10MB484636FF6BE61659C17C950BDCAC9@DB9PR10MB4846.EURPRD10.PROD.OUTLOOK.COM
обсуждение исходный текст
Список pgsql-hackers
Dear PostgreSQL Developers,

I'm currently working on a GiST extension (a new index structure) for PostgreSQL
and I want to make it as customizable as I can. To achieve my goal I'm trying to take
advantage of the options GiST support function to provide extra parameters to the
operator class.

Because I'm creating a new index structure, I've also developed new operators
where I want to access the value of the operator class parameters as well. My main
problem is that I can't do that, because the parameters are only accessible from the
registered GiST support functions through specific macros.

To solve the problem, I've tried to use global variables but it was very inconsistent
because of the complex memory management of the whole system (also, I'm not as
great in C programming as I want to be).

Could you please help, by telling me that iss there any way to store and access
values globally in PostgreSQL? I want to store these values in a way that is not
affected by restarting the database server or maybe the whole computer.

I would really appreciate your help. Thanks in advance!

Best regards,
Zsolt

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

Предыдущее
От: Aleksander Alekseev
Дата:
Сообщение: Re: CREATE TABLE ( .. STORAGE ..)
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Tightening behaviour for non-immutable behaviour in immutable functions