mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Add a bunch of pseudo-types to replace the behavior formerly associated
with OPAQUE, as per recent pghackers discussion. I still want to do some more work on the 'cstring' pseudo-type, but I'm going to commit the bulk of the changes now before the tree starts shifting under me ...
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_language.sgml,v 1.26 2002/07/24 19:11:07 petere Exp $
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_language.sgml,v 1.27 2002/08/22 00:01:40 tgl Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@ -108,8 +108,8 @@ CREATE [ TRUSTED ] [ PROCEDURAL ] LANGUAGE <replaceable class="parameter">langna
|
||||
language such as C with version 1 call convention and
|
||||
registered with <productname>PostgreSQL</productname> as a
|
||||
function taking no arguments and returning the
|
||||
<type>opaque</type> type, a placeholder for unspecified or
|
||||
undefined types.
|
||||
<type>language_handler</type> type, a placeholder type that is
|
||||
simply used to identify the function as a call handler.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@ -122,11 +122,13 @@ CREATE [ TRUSTED ] [ PROCEDURAL ] LANGUAGE <replaceable class="parameter">langna
|
||||
<replaceable class="parameter">valfunction</replaceable> is the
|
||||
name of a previously registered function that will be called
|
||||
when a new function in the language is created, to validate the
|
||||
new function. The validator function must take one argument of
|
||||
type <type>oid</type>, which will be the OID of the
|
||||
to-be-created function, and can have any return type. If no
|
||||
new function.
|
||||
If no
|
||||
validator function is specified, then a new function will not
|
||||
be checked when it is created.
|
||||
The validator function must take one argument of
|
||||
type <type>oid</type>, which will be the OID of the
|
||||
to-be-created function, and will typically return <type>void</>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@ -251,7 +253,7 @@ ERROR: PL handler function <replaceable class="parameter">funcname</replaceable
|
||||
The following two commands executed in sequence will register a new
|
||||
procedural language and the associated call handler.
|
||||
<programlisting>
|
||||
CREATE FUNCTION plsample_call_handler () RETURNS opaque
|
||||
CREATE FUNCTION plsample_call_handler () RETURNS language_handler
|
||||
AS '$libdir/plsample'
|
||||
LANGUAGE C;
|
||||
CREATE LANGUAGE plsample
|
||||
|
Reference in New Issue
Block a user