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
c8b5598a
Commit
c8b5598a
authored
23 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Document pltcl's return_null command.
parent
955c8771
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/pltcl.sgml
+10
-3
10 additions, 3 deletions
doc/src/sgml/pltcl.sgml
with
10 additions
and
3 deletions
doc/src/sgml/pltcl.sgml
+
10
−
3
View file @
c8b5598a
<!--
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/pltcl.sgml,v 2.
8
2001/0
3/25 10:16:12 petere
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/pltcl.sgml,v 2.
9
2001/0
4/30 22:22:34 tgl
Exp $
-->
-->
<chapter id="pltcl">
<chapter id="pltcl">
...
@@ -96,8 +96,10 @@ CREATE FUNCTION <replaceable>funcname</replaceable> (<replaceable>argument-types
...
@@ -96,8 +96,10 @@ CREATE FUNCTION <replaceable>funcname</replaceable> (<replaceable>argument-types
</programlisting>
</programlisting>
When the function is called, the arguments are given as
When the function is called, the arguments are given as
variables $1 ... $n to the Tcl procedure body. For example,
variables <literal>$1</literal> ... <literal>$n</literal> to the
a function
Tcl procedure body. The result is returned
from the Tcl code in the usual way, with a <literal>return</literal>
statement. For example, a function
returning the higher of two int4 values could be defined as:
returning the higher of two int4 values could be defined as:
<programlisting>
<programlisting>
...
@@ -107,6 +109,11 @@ CREATE FUNCTION tcl_max (int4, int4) RETURNS int4 AS '
...
@@ -107,6 +109,11 @@ CREATE FUNCTION tcl_max (int4, int4) RETURNS int4 AS '
' LANGUAGE 'pltcl';
' LANGUAGE 'pltcl';
</programlisting>
</programlisting>
To return a NULL value from a PL/Tcl function, execute
<literal>return_null</literal>.
</para>
<para>
Composite type arguments are given to the procedure as Tcl arrays.
Composite type arguments are given to the procedure as Tcl arrays.
The element names
The element names
in the array are the attribute names of the composite
in the array are the attribute names of the composite
...
...
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