Re: proposal, patch: allow multiple plpgsql plugins

From: Marko Tiikkaja <marko(at)joh(dot)to>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: proposal, patch: allow multiple plpgsql plugins
Date: 2014-03-02 20:55:33
Message-ID: 53139AC5.4050105@joh.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3/2/14, 8:47 PM, Pavel Stehule wrote:
> 2014-03-02 19:59 GMT+01:00 Marko Tiikkaja <marko(at)joh(dot)to>:
>> Undefined symbols for architecture x86_64:
>> "_plpgsql_register_plugin", referenced from:
>> __PG_init in plpgtest.o
>>
>> I'm guessing this is because PL/PgSQL is a shared library and not in core?
>> Is there a way around this?
>>
>
> yes, PLpgSQL is not referenced and, if I remember well, clang is too
> restrictive.
>
> probably
> http://stackoverflow.com/questions/17281901/ignoring-an-undefined-symbol-in-a-dynamic-library-from-xcode
>
> or you can add a reference on plpgsql to your Makefile

That seems unbelievably ugly, but worse, loading the library in
shared_preload_libraries doesn't work:

14782 FATAL: could not load library
"/usr/local/pgsql/lib/plpgtest.so":
dlopen(/usr/local/pgsql/lib/plpgtest.so, 10): Symbol not found:
_plpgsql_register_plugin
Referenced from: /usr/local/pgsql/lib/plpgtest.so
Expected in: flat namespace
in /usr/local/pgsql/lib/plpgtest.so

I even tried putting plpgsql.so before it in the list, but no go.

Regards,
Marko Tiikkaja

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2014-03-02 22:17:33 Re: Securing "make check" (CVE-2014-0067)
Previous Message Stephen Frost 2014-03-02 20:17:55 Re: Securing "make check" (CVE-2014-0067)