Dynamic modules and standard naming practice - Mailing list pgsql-hackers

From Thomas Hallgren
Subject Dynamic modules and standard naming practice
Date
Msg-id buoh8e$m68$1@news.hub.org
Whole thread Raw
List pgsql-hackers
On Unix, the general rule for a shared library is to prepend "lib" and
append ".so". On Windows, nothing is prepended and you add ".dll". Thus for
a module named "pljava" you'd get:

libpljava.so on Unix and:
pljava.dll on Windows.

This is in fact so common that the Java Native Interface (JNI) uses it as
the default way of finding things. When loading a library from Java, you
would say System.loadLibrary("pljava") and it would autmatically resolve to
libpljava.so and pljava.dll on the respective systems.

PostgreSQL, while substituting the postfix correctly, never seems to prepend
"lib" on a Unix system. Consequently, I have to use "libpljava" to reference
the module in SQL while I use "pljava" for the same module in Java. It would
be very nice if PostgreSQL could make an attempt to first prepend the "lib"
and if that doesn't work, try without the prefix on a Unix system.

Regards,

Thomas Hallgren




pgsql-hackers by date:

Previous
From: "Simon Riggs"
Date:
Subject: Re: cache control?
Next
From: Jan Wieck
Date:
Subject: Re: Singnals code (not just win32 specific)