Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
5a584ba5
Commit
5a584ba5
authored
25 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Copy-editing, mostly.
parent
6b77778c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/src/sgml/xplang.sgml
+20
-15
20 additions, 15 deletions
doc/src/sgml/xplang.sgml
with
20 additions
and
15 deletions
doc/src/sgml/xplang.sgml
+
20
−
15
View file @
5a584ba5
<!--
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/xplang.sgml,v 1.
7
2000/0
3/31 03:27
:4
2
t
homas
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/xplang.sgml,v 1.
8
2000/0
4/02 22:59
:4
0
t
gl
Exp $
-->
-->
<chapter id="xplang">
<chapter id="xplang">
...
@@ -10,14 +10,19 @@ $Header: /cvsroot/pgsql/doc/src/sgml/xplang.sgml,v 1.7 2000/03/31 03:27:42 thoma
...
@@ -10,14 +10,19 @@ $Header: /cvsroot/pgsql/doc/src/sgml/xplang.sgml,v 1.7 2000/03/31 03:27:42 thoma
the definition of procedural languages.
the definition of procedural languages.
In the case of a function or trigger
In the case of a function or trigger
procedure defined in a procedural language, the database has
procedure defined in a procedural language, the database has
no builtin knowlege how to interpret the functions source
no built
-
in knowle
d
ge
about
how to interpret the function
'
s source
text. Instead, the
calls are
passed
in
to
text. Instead, the
task is
passed to
a handler that knows the details of the language. The
a handler that knows the details of the language. The
handler itself is a special programming language function
handler itself is a special programming language function
compiled into a shared object
compiled into a shared object
and loaded on demand.
and loaded on demand.
</para>
</para>
<para>
Writing a handler for a new procedural language (PL)
is outside the scope of this manual.
</para>
<sect1>
<sect1>
<title>Installing Procedural Languages</title>
<title>Installing Procedural Languages</title>
...
@@ -28,6 +33,9 @@ $Header: /cvsroot/pgsql/doc/src/sgml/xplang.sgml,v 1.7 2000/03/31 03:27:42 thoma
...
@@ -28,6 +33,9 @@ $Header: /cvsroot/pgsql/doc/src/sgml/xplang.sgml,v 1.7 2000/03/31 03:27:42 thoma
<para>
<para>
A procedural language is installed in the database in three steps.
A procedural language is installed in the database in three steps.
(For the languages supplied with the standard distribution, the
shell script <filename>createlang</filename> can be used instead
of carrying out the details manually.)
</para>
</para>
<step performance="Required">
<step performance="Required">
...
@@ -39,10 +47,6 @@ $Header: /cvsroot/pgsql/doc/src/sgml/xplang.sgml,v 1.7 2000/03/31 03:27:42 thoma
...
@@ -39,10 +47,6 @@ $Header: /cvsroot/pgsql/doc/src/sgml/xplang.sgml,v 1.7 2000/03/31 03:27:42 thoma
configured in, the handler for PL/Tcl is also built
configured in, the handler for PL/Tcl is also built
and installed in the same location.
and installed in the same location.
</para>
</para>
<para>
Writing a handler for a new procedural language (PL)
is outside the scope of this manual.
</para>
</step>
</step>
<step performance="Required">
<step performance="Required">
<para>
<para>
...
@@ -53,8 +57,8 @@ CREATE FUNCTION <replaceable>handler_function_name</replaceable> ()
...
@@ -53,8 +57,8 @@ CREATE FUNCTION <replaceable>handler_function_name</replaceable> ()
'<filename>path-to-shared-object</filename>' LANGUAGE 'C';
'<filename>path-to-shared-object</filename>' LANGUAGE 'C';
</programlisting>
</programlisting>
The special return type of <acronym>OPAQUE</acronym> tells
The special return type of <acronym>OPAQUE</acronym> tells
the database
,
that this function does not return one of
the database that this function does not return one of
the defined
base- or composite
types and is not directly usable
the defined
<acronym>SQL</acronym> data
types and is not directly usable
in <acronym>SQL</acronym> statements.
in <acronym>SQL</acronym> statements.
</para>
</para>
</step>
</step>
...
@@ -67,11 +71,12 @@ CREATE [ TRUSTED ] PROCEDURAL LANGUAGE '<replaceable>language-name</replaceable>
...
@@ -67,11 +71,12 @@ CREATE [ TRUSTED ] PROCEDURAL LANGUAGE '<replaceable>language-name</replaceable>
LANCOMPILER '<replaceable>description</replaceable>';
LANCOMPILER '<replaceable>description</replaceable>';
</programlisting>
</programlisting>
The optional keyword <acronym>TRUSTED</acronym> tells
The optional keyword <acronym>TRUSTED</acronym> tells
if
ordinary database users that have no superuser
whether
ordinary database users that have no superuser
privileges
can
use this language to create functions
privileges
should be allowed to
use this language to create functions
and trigger procedures. Since PL functions are
and trigger procedures. Since PL functions are
executed inside the database backend it should only be used for
executed inside the database backend, the <acronym>TRUSTED</acronym>
languages that don't gain access to database backends
flag should only be given for
languages that don't allow access to database backends
internals or the filesystem. The languages PL/pgSQL and
internals or the filesystem. The languages PL/pgSQL and
PL/Tcl are known to be trusted.
PL/Tcl are known to be trusted.
</para>
</para>
...
@@ -83,7 +88,7 @@ CREATE [ TRUSTED ] PROCEDURAL LANGUAGE '<replaceable>language-name</replaceable>
...
@@ -83,7 +88,7 @@ CREATE [ TRUSTED ] PROCEDURAL LANGUAGE '<replaceable>language-name</replaceable>
<step performance="Required">
<step performance="Required">
<para>
<para>
The following command tells the database where to find the
The following command tells the database where to find the
shared object for the PL/pgSQL languages call handler function.
shared object for the PL/pgSQL language
'
s call handler function.
<programlisting>
<programlisting>
CREATE FUNCTION plpgsql_call_handler () RETURNS OPAQUE AS
CREATE FUNCTION plpgsql_call_handler () RETURNS OPAQUE AS
...
@@ -116,7 +121,7 @@ CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql'
...
@@ -116,7 +121,7 @@ CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql'
functions call arguments and it's return data type. The source
functions call arguments and it's return data type. The source
text of the functions body is found in the prosrc attribute of
text of the functions body is found in the prosrc attribute of
<literal>pg_proc</literal>.
<literal>pg_proc</literal>.
Due to this,
in contrast to C language functions,
PL functions
Due to this, PL functions
can be overloaded like SQL language functions. There can be
can be overloaded like SQL language functions. There can be
multiple different PL functions having the same function name,
multiple different PL functions having the same function name,
as long as the call arguments differ.
as long as the call arguments differ.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment