|
1 |
| -<!-- $PostgreSQL: pgsql/doc/src/sgml/xfunc.sgml,v 1.118 2006/11/23 03:52:05 momjian Exp $ --> |
| 1 | +<!-- $PostgreSQL: pgsql/doc/src/sgml/xfunc.sgml,v 1.119 2006/11/23 05:28:18 neilc Exp $ --> |
2 | 2 |
|
3 | 3 | <sect1 id="xfunc">
|
4 | 4 | <title>User-Defined Functions</title>
|
@@ -1234,12 +1234,12 @@ PG_MODULE_MAGIC;
|
1234 | 1234 | <para>
|
1235 | 1235 | Optionally, a dynamically loaded file can contain initialization and
|
1236 | 1236 | finalization functions. If the file includes a function named
|
1237 |
| - <literal>_PG_init</>, that function will be called immediately after |
| 1237 | + <function>_PG_init</>, that function will be called immediately after |
1238 | 1238 | loading the file. The function receives no parameters and should
|
1239 | 1239 | return void. If the file includes a function named
|
1240 |
| - <literal>_PG_fini</>, that function will be called immediately before |
| 1240 | + <function>_PG_fini</>, that function will be called immediately before |
1241 | 1241 | unloading the file. Likewise, the function receives no parameters and
|
1242 |
| - should return void. Note that <literal>_PG_fini</> will only be called |
| 1242 | + should return void. Note that <function>_PG_fini</> will only be called |
1243 | 1243 | during an unload of the file, not during process termination.
|
1244 | 1244 | (Presently, an unload only happens in the context of re-loading
|
1245 | 1245 | the file due to an explicit <command>LOAD</> command.)
|
@@ -2921,20 +2921,19 @@ CREATE FUNCTION make_array(anyelement) RETURNS anyarray
|
2921 | 2921 | <programlisting>
|
2922 | 2922 | void RequestAddinShmemSpace(int size)
|
2923 | 2923 | </programlisting>
|
2924 |
| - from your <literal>_PG_init</> function. |
| 2924 | + from your <function>_PG_init</> function. |
2925 | 2925 | </para>
|
2926 | 2926 | <para>
|
2927 | 2927 | LWLocks are reserved by calling:
|
2928 | 2928 | <programlisting>
|
2929 | 2929 | void RequestAddinLWLocks(int n)
|
2930 | 2930 | </programlisting>
|
2931 |
| - from <literal>_PG_init</>. |
| 2931 | + from <function>_PG_init</>. |
2932 | 2932 | </para>
|
2933 | 2933 | <para>
|
2934 | 2934 | To avoid possible race-conditions, each backend should use the LWLock
|
2935 |
| - <literal>AddinShmemInitLock</> when connecting to and intializing |
| 2935 | + <function>AddinShmemInitLock</> when connecting to and initializing |
2936 | 2936 | its allocation of shared memory, as shown here:
|
2937 |
| - |
2938 | 2937 | <programlisting>
|
2939 | 2938 | static mystruct *ptr = NULL;
|
2940 | 2939 |
|
|
0 commit comments