Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit cb8b40e

Browse files
committed
Allow special '$libdir' macro to show up in object file path in CREATE
FUNCTION command. Guard against trying to load a directory. Update documentation some.
1 parent a008109 commit cb8b40e

File tree

7 files changed

+387
-522
lines changed

7 files changed

+387
-522
lines changed

doc/src/sgml/dfunc.sgml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/dfunc.sgml,v 1.13 2001/01/20 20:59:28 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/dfunc.sgml,v 1.14 2001/05/19 09:01:10 petere Exp $
33
-->
44

55
<sect2 id="dfunc">
@@ -264,7 +264,7 @@ gcc -shared -o foo.so foo.o
264264
<productname>Postgres</productname>. When specifying the file name
265265
to the <command>CREATE FUNCTION</command> command, one must give it
266266
the name of the shared library file (ending in
267-
<filename>.so</filename>) rather than the simple object file.
267+
<filename>.so</filename>) rather than the intermediate object file.
268268

269269
<note>
270270
<para>
@@ -273,21 +273,8 @@ gcc -shared -o foo.so foo.o
273273
</para>
274274
</note>
275275

276-
Paths given to the <command>CREATE FUNCTION</command> command must
277-
be absolute paths (i.e., start with <literal>/</literal>) that refer
278-
to directories visible on the machine on which the
279-
<productname>Postgres</productname> server is running. Relative
280-
paths do in fact work, but are relative to the directory where the
281-
database resides (which is generally invisible to the frontend
282-
application). Obviously, it makes no sense to make the path
283-
relative to the directory in which the user started the frontend
284-
application, since the server could be running on a completely
285-
different machine! The user id the
286-
<productname>Postgres</productname> server runs as must be able to
287-
traverse the path given to the <command>CREATE FUNCTION</command>
288-
command and be able to read the shared library file. (Making the
289-
file or a higher-level directory not readable and/or not executable
290-
by the <quote>postgres</quote> user is a common mistake.)
276+
Refer back to <xref linkend="xfunc-c-dynload"> about where the
277+
server expects to find the shared library files.
291278
</para>
292279

293280
<!--

0 commit comments

Comments
 (0)