~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

Viewing changes to doc/src/sgml/ref/load.sgml

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-05-11 10:41:53 UTC
  • Revision ID: james.westby@ubuntu.com-20110511104153-psbh2o58553fv1m0
Tags: upstream-9.1~beta1
ImportĀ upstreamĀ versionĀ 9.1~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!--
 
2
doc/src/sgml/ref/load.sgml
 
3
-->
 
4
 
 
5
<refentry id="SQL-LOAD">
 
6
 <refmeta>
 
7
  <refentrytitle>LOAD</refentrytitle>
 
8
  <manvolnum>7</manvolnum>
 
9
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 
10
 </refmeta>
 
11
 
 
12
 <refnamediv>
 
13
  <refname>LOAD</refname>
 
14
  <refpurpose>load a shared library file</refpurpose>
 
15
 </refnamediv>
 
16
 
 
17
 <indexterm zone="sql-load">
 
18
  <primary>LOAD</primary>
 
19
 </indexterm>
 
20
 
 
21
 <refsynopsisdiv>
 
22
<synopsis>
 
23
LOAD '<replaceable class="PARAMETER">filename</replaceable>'
 
24
</synopsis>
 
25
 </refsynopsisdiv>
 
26
 
 
27
 <refsect1 id="sql-load-description">
 
28
  <title>Description</title>
 
29
 
 
30
  <para>
 
31
   This command loads a shared library file into the <productname>PostgreSQL</>
 
32
   server's address space.  If the file has been loaded already,
 
33
   the command does nothing.  Shared library files that contain C functions
 
34
   are automatically loaded whenever one of their functions is called.
 
35
   Therefore, an explicit <command>LOAD</> is usually only needed to
 
36
   load a library that modifies the server's behavior through <quote>hooks</>
 
37
   rather than providing a set of functions.
 
38
  </para>
 
39
 
 
40
  <para>
 
41
   The file name is specified in the same way as for shared library
 
42
   names in <xref linkend="sql-createfunction">; in particular, one
 
43
   can rely on a search path and automatic addition of the system's standard
 
44
   shared library file name extension.  See <xref linkend="xfunc-c"> for
 
45
   more information on this topic.
 
46
  </para>
 
47
 
 
48
  <indexterm>
 
49
   <primary><filename>$libdir/plugins</></primary>
 
50
  </indexterm>
 
51
 
 
52
  <para>
 
53
   Non-superusers can only apply <command>LOAD</> to library files
 
54
   located in <filename>$libdir/plugins/</> &mdash; the specified
 
55
   <replaceable class="PARAMETER">filename</replaceable> must begin
 
56
   with exactly that string.  (It is the database administrator's
 
57
   responsibility to ensure that only <quote>safe</> libraries
 
58
   are installed there.)
 
59
  </para>
 
60
 </refsect1>
 
61
 
 
62
 <refsect1 id="sql-load-compat">
 
63
  <title>Compatibility</title>
 
64
 
 
65
  <para>
 
66
   <command>LOAD</command> is a <productname>PostgreSQL</productname>
 
67
   extension.
 
68
  </para>
 
69
 </refsect1>
 
70
 
 
71
 
 
72
 <refsect1>
 
73
  <title>See Also</title>
 
74
 
 
75
  <para>
 
76
   <xref linkend="sql-createfunction">
 
77
  </para>
 
78
 </refsect1>
 
79
</refentry>