Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
5a584ba5
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5a584ba5
编写于
4月 02, 2000
作者:
T
Tom Lane
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Copy-editing, mostly.
上级
6b77778c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
20 addition
and
15 deletion
+20
-15
doc/src/sgml/xplang.sgml
doc/src/sgml/xplang.sgml
+20
-15
未找到文件。
doc/src/sgml/xplang.sgml
浏览文件 @
5a584ba5
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/xplang.sgml,v 1.
7 2000/03/31 03:27:42 thomas
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/xplang.sgml,v 1.
8 2000/04/02 22:59:40 tgl
Exp $
-->
<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
the definition of procedural languages.
In the case of a function or trigger
procedure defined in a procedural language, the database has
no built
in knowlege how to interpret the function
s source
text. Instead, the
calls are passed in
to
no built
-in knowledge about how to interpret the function'
s source
text. Instead, the
task is passed
to
a handler that knows the details of the language. The
handler itself is a special programming language function
compiled into a shared object
and loaded on demand.
</para>
<para>
Writing a handler for a new procedural language (PL)
is outside the scope of this manual.
</para>
<sect1>
<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
<para>
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>
<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
configured in, the handler for PL/Tcl is also built
and installed in the same location.
</para>
<para>
Writing a handler for a new procedural language (PL)
is outside the scope of this manual.
</para>
</step>
<step performance="Required">
<para>
...
...
@@ -53,8 +57,8 @@ CREATE FUNCTION <replaceable>handler_function_name</replaceable> ()
'<filename>path-to-shared-object</filename>' LANGUAGE 'C';
</programlisting>
The special return type of <acronym>OPAQUE</acronym> tells
the database
,
that this function does not return one of
the defined
base- or composite
types and is not directly usable
the database that this function does not return one of
the defined
<acronym>SQL</acronym> data
types and is not directly usable
in <acronym>SQL</acronym> statements.
</para>
</step>
...
...
@@ -67,11 +71,12 @@ CREATE [ TRUSTED ] PROCEDURAL LANGUAGE '<replaceable>language-name</replaceable>
LANCOMPILER '<replaceable>description</replaceable>';
</programlisting>
The optional keyword <acronym>TRUSTED</acronym> tells
if
ordinary database users that have no superuser
privileges
can
use this language to create functions
whether
ordinary database users that have no superuser
privileges
should be allowed to
use this language to create functions
and trigger procedures. Since PL functions are
executed inside the database backend it should only be used for
languages that don't gain access to database backends
executed inside the database backend, the <acronym>TRUSTED</acronym>
flag should only be given for
languages that don't allow access to database backends
internals or the filesystem. The languages PL/pgSQL and
PL/Tcl are known to be trusted.
</para>
...
...
@@ -83,7 +88,7 @@ CREATE [ TRUSTED ] PROCEDURAL LANGUAGE '<replaceable>language-name</replaceable>
<step performance="Required">
<para>
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>
CREATE FUNCTION plpgsql_call_handler () RETURNS OPAQUE AS
...
...
@@ -116,7 +121,7 @@ CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql'
functions call arguments and it's return data type. The source
text of the functions body is found in the prosrc attribute of
<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
multiple different PL functions having the same function name,
as long as the call arguments differ.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录