Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
7d1d7200
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,发现更多精彩内容 >>
提交
7d1d7200
编写于
3月 20, 2003
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Minor doc patch: create function
Gavin Sherry
上级
ee303739
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
30 addition
and
22 deletion
+30
-22
doc/src/sgml/ref/create_function.sgml
doc/src/sgml/ref/create_function.sgml
+30
-22
未找到文件。
doc/src/sgml/ref/create_function.sgml
浏览文件 @
7d1d7200
<!--
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_function.sgml,v 1.4
4 2003/01/19 00:13:29
momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_function.sgml,v 1.4
5 2003/03/20 04:41:13
momjian Exp $
-->
-->
<refentry id="SQL-CREATEFUNCTION">
<refentry id="SQL-CREATEFUNCTION">
...
@@ -66,18 +66,22 @@ CREATE [ OR REPLACE ] FUNCTION <replaceable class="parameter">name</replaceable>
...
@@ -66,18 +66,22 @@ CREATE [ OR REPLACE ] FUNCTION <replaceable class="parameter">name</replaceable>
<listitem>
<listitem>
<para>
<para>
The data type(s) of the function's arguments, if any. The
The data type(s) of the function's arguments (optionally
input types may be base, complex, or domain types,
schema-qualified), if any. The input types may be base, complex, or
or the same as the type of an existing column.
domain types, or the same as the type of an existing column.
The type of a column is referenced by writing <replaceable
</para>
class="parameter">tablename</replaceable>.<replaceable
<para>
class="parameter">columnname</replaceable><literal>%TYPE</literal>;
The type of a column is referenced by writing <replaceable
using this can sometimes help make a function independent from
class="parameter">tablename</replaceable>.<replaceable
changes to the definition of a table.
class="parameter">columnname</replaceable><literal>%TYPE</literal>;
Depending on the implementation language it may also be allowed
using this can sometimes help make a function independent from
to specify <quote>pseudo-types</> such as <type>cstring</>.
changes to the definition of a table.
Pseudo-types indicate that the actual argument type is either
</para>
incompletely specified, or outside the set of ordinary SQL data types.
<para>
Depending on the implementation language it may also be allowed
to specify <quote>pseudo-types</> such as <type>cstring</>.
Pseudo-types indicate that the actual argument type is either
incompletely specified, or outside the set of ordinary SQL data types.
</para>
</para>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
...
@@ -87,9 +91,13 @@ CREATE [ OR REPLACE ] FUNCTION <replaceable class="parameter">name</replaceable>
...
@@ -87,9 +91,13 @@ CREATE [ OR REPLACE ] FUNCTION <replaceable class="parameter">name</replaceable>
<listitem>
<listitem>
<para>
<para>
The return data type. The return type may be specified as a
The return data type (optionally schema-qualified). The return type
base, complex, or domain type, or the same as the type of an
may be specified as a base, complex, domain type
existing column.
or the same as the type of an existing column. See the description
under <literal>argtype</literal> above on how to reference the type
of an existing column.
</para>
<para>
Depending on the implementation language it may also be allowed
Depending on the implementation language it may also be allowed
to specify <quote>pseudo-types</> such as <type>cstring</>.
to specify <quote>pseudo-types</> such as <type>cstring</>.
The <literal>setof</literal>
The <literal>setof</literal>
...
@@ -432,13 +440,13 @@ CREATE FUNCTION point(complex) RETURNS point
...
@@ -432,13 +440,13 @@ CREATE FUNCTION point(complex) RETURNS point
<programlisting>
<programlisting>
Point * complex_to_point (Complex *z)
Point * complex_to_point (Complex *z)
{
{
Point *p;
Point *p;
p = (Point *) palloc(sizeof(Point));
p = (Point *) palloc(sizeof(Point));
p->x = z->x;
p->x = z->x;
p->y = z->y;
p->y = z->y;
return p;
return p;
}
}
</programlisting>
</programlisting>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录