using libjansson in postgres extension

From: mahendrakar s <mahendrakarforpg(at)gmail(dot)com>
To: pgsql-novice <pgsql-novice(at)lists(dot)postgresql(dot)org>
Subject: using libjansson in postgres extension
Date: 2023-02-23 13:38:50
Message-ID: CABkiuWpifg0tA_odWOXMXcJEQ8ghk3n+amEFB_0Dg33fEmR6TA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hello Hackers,

I'm developing an extension where in it indirectly references (libjansson)
and libjansson has a symbol json_object
<https://github.com/akheron/jansson/blob/master/src/load.c#:~:text=json_t%20*object%20%3D%20json_object()%3B>which
conflicts with postgres symbol 'json_object
<https://github.com/postgres/postgres/blob/master/src/backend/utils/adt/json.c#:~:text=json_object(PG_FUNCTION_ARGS)>
'.

I see below:
PostgreSQL: Documentation: 11: 38.10. C-Language Functions
<https://www.postgresql.org/docs/11/xfunc-c.html#id-1.8.3.13.8>
"Symbol names defined within object files must not conflict with each other
or with symbols defined in the PostgreSQL server executable. You will have
to rename your functions or variables if you get error messages to this
effect."

But this requires to maintain libjansson with customizations(have a
different symbol) to meet the needs.

Do you have any suggestions to use the libjansson 'as it is' without using
the different symbol.

Thanks,
Mahendrakar.

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message mahendrakar s 2023-02-24 01:59:23 Re: using libjansson in postgres extension
Previous Message Bzzzz 2022-11-15 18:51:55 Re: hstore or jsonb ?