Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
b3195dae
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,发现更多精彩内容 >>
提交
b3195dae
编写于
5月 26, 2005
作者:
N
Neil Conway
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Minor cleanup for recent SQLSTATE / SQLERRM patch: spell "successful"
correctly, style fixes.
上级
63e0d612
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
12 deletion
+13
-12
src/pl/plpgsql/src/gram.y
src/pl/plpgsql/src/gram.y
+3
-2
src/pl/plpgsql/src/pl_exec.c
src/pl/plpgsql/src/pl_exec.c
+6
-7
src/test/regress/expected/plpgsql.out
src/test/regress/expected/plpgsql.out
+2
-2
src/test/regress/sql/plpgsql.sql
src/test/regress/sql/plpgsql.sql
+2
-1
未找到文件。
src/pl/plpgsql/src/gram.y
浏览文件 @
b3195dae
...
...
@@ -4,7 +4,7 @@
* procedural language
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/pl/plpgsql/src/gram.y,v 1.7
0 2005/05/26 00:16:31 momjian
Exp $
* $PostgreSQL: pgsql/src/pl/plpgsql/src/gram.y,v 1.7
1 2005/05/26 03:18:53 neilc
Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
...
...
@@ -285,7 +285,8 @@ fict_vars_sect :
plpgsql_build_datatype(TEXTOID, -1), true);
$$.sqlerrm_varno = var->dno;
plpgsql_add_initdatums(NULL);
};
}
;
decl_sect : opt_label
{
...
...
src/pl/plpgsql/src/pl_exec.c
浏览文件 @
b3195dae
...
...
@@ -3,7 +3,7 @@
* procedural language
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.1
39 2005/05/26 00:16:31 momjian
Exp $
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.1
40 2005/05/26 03:18:53 neilc
Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
...
...
@@ -760,7 +760,7 @@ exec_stmt_block(PLpgSQL_execstate *estate, PLpgSQL_stmt_block *block)
var
=
(
PLpgSQL_var
*
)
(
estate
->
datums
[
block
->
sqlerrm_varno
]);
var
->
isnull
=
false
;
var
->
freeval
=
true
;
var
->
value
=
DirectFunctionCall1
(
textin
,
CStringGetDatum
(
"Sucessful completion"
));
var
->
value
=
DirectFunctionCall1
(
textin
,
CStringGetDatum
(
"Suc
c
essful completion"
));
/*
* First initialize all variables declared in this block
...
...
@@ -777,7 +777,7 @@ exec_stmt_block(PLpgSQL_execstate *estate, PLpgSQL_stmt_block *block)
if
(
var
->
freeval
)
{
pfree
(
(
void
*
)
(
var
->
value
));
pfree
(
DatumGetPointer
(
var
->
value
));
var
->
freeval
=
false
;
}
...
...
@@ -872,13 +872,12 @@ exec_stmt_block(PLpgSQL_execstate *estate, PLpgSQL_stmt_block *block)
CurrentResourceOwner
=
oldowner
;
/* set SQLSTATE and SQLERRM variables */
var
=
(
PLpgSQL_var
*
)
(
estate
->
datums
[
block
->
sqlstate_varno
]);
pfree
(
(
void
*
)
(
var
->
value
));
pfree
(
DatumGetPointer
(
var
->
value
));
var
->
value
=
DirectFunctionCall1
(
textin
,
CStringGetDatum
(
unpack_sql_state
(
edata
->
sqlerrcode
)));
var
=
(
PLpgSQL_var
*
)
(
estate
->
datums
[
block
->
sqlerrm_varno
]);
pfree
(
(
void
*
)
(
var
->
value
));
pfree
(
DatumGetPointer
(
var
->
value
));
var
->
value
=
DirectFunctionCall1
(
textin
,
CStringGetDatum
(
edata
->
message
));
/*
...
...
src/test/regress/expected/plpgsql.out
浏览文件 @
b3195dae
...
...
@@ -2381,7 +2381,7 @@ CONTEXT: PL/pgSQL function "missing_return_expr"
drop function void_return_expr();
drop function missing_return_expr();
-- test SQLSTATE and SQLERRM
create
or replace
function trap_exceptions() returns void as $_$
create function trap_exceptions() returns void as $_$
begin
begin
raise exception 'first exception';
...
...
@@ -2398,7 +2398,7 @@ begin
end; $_$ language plpgsql;
select trap_exceptions();
NOTICE: P0001 first exception
NOTICE: 00000 Sucessful completion
NOTICE: 00000 Suc
c
essful completion
NOTICE: P0001 last exception
trap_exceptions
-----------------
...
...
src/test/regress/sql/plpgsql.sql
浏览文件 @
b3195dae
...
...
@@ -2018,8 +2018,9 @@ select missing_return_expr();
drop
function
void_return_expr
();
drop
function
missing_return_expr
();
-- test SQLSTATE and SQLERRM
create
or
replace
function
trap_exceptions
()
returns
void
as
$
_
$
create
function
trap_exceptions
()
returns
void
as
$
_
$
begin
begin
raise
exception
'first exception'
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录