Thread: Exposing guc_malloc/strdup/realloc for plugins?

Exposing guc_malloc/strdup/realloc for plugins?

From
Michael Paquier
Date:
Hi all,

While hacking on an extension, I have finished by doing things similar
to guc_malloc & friends for the allocation of a GUC parameter for malloc
portability.  While that's not really a big deal to copy/paste this
code, I am wondering if it would make sense to expose them for extension
developers.  Please see the attached for the simple idea.

Thanks,
--
Michael

Attachment

Re: Exposing guc_malloc/strdup/realloc for plugins?

From
Euler Taveira
Date:
2018-05-08 3:46 GMT-03:00 Michael Paquier <michael@paquier.xyz>:
> While hacking on an extension, I have finished by doing things similar
> to guc_malloc & friends for the allocation of a GUC parameter for malloc
> portability.  While that's not really a big deal to copy/paste this
> code, I am wondering if it would make sense to expose them for extension
> developers.  Please see the attached for the simple idea.
>
Although I didn't need similar code on some extensions, code reuse is
always a good goal.


-- 
   Euler Taveira                                   Timbira -
http://www.timbira.com.br/
   PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento