Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
ba17165f
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,发现更多精彩内容 >>
提交
ba17165f
编写于
6月 07, 2001
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
This adds unary plus capability. No grammar changes, per Tom's request.
Marko Kreen
上级
a6697b36
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
102 addition
and
13 deletion
+102
-13
src/backend/commands/command.c
src/backend/commands/command.c
+13
-1
src/backend/utils/adt/float.c
src/backend/utils/adt/float.c
+17
-3
src/backend/utils/adt/int.c
src/backend/utils/adt/int.c
+17
-1
src/backend/utils/adt/int8.c
src/backend/utils/adt/int8.c
+9
-1
src/backend/utils/adt/numeric.c
src/backend/utils/adt/numeric.c
+14
-1
src/include/catalog/pg_operator.h
src/include/catalog/pg_operator.h
+8
-1
src/include/catalog/pg_proc.h
src/include/catalog/pg_proc.h
+14
-1
src/include/utils/builtins.h
src/include/utils/builtins.h
+6
-1
src/include/utils/int8.h
src/include/utils/int8.h
+2
-1
src/interfaces/jdbc/org/postgresql/Connection.java
src/interfaces/jdbc/org/postgresql/Connection.java
+2
-2
未找到文件。
src/backend/commands/command.c
浏览文件 @
ba17165f
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.13
1 2001/05/30 13:00:03
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.13
2 2001/06/07 00:09:28
momjian Exp $
*
* NOTES
* The PerformAddAttribute() code, like most of the relation
...
...
@@ -176,6 +176,12 @@ PerformPortalFetch(char *name,
if
(
!
portal
->
atEnd
)
{
ExecutorRun
(
queryDesc
,
estate
,
EXEC_FOR
,
(
long
)
count
);
/*
* I use CMD_UPDATE, because no CMD_MOVE or the like
* exists, and I would like to provide the same
* kind of info as CMD_UPDATE
*/
UpdateCommandInfo
(
CMD_UPDATE
,
0
,
estate
->
es_processed
);
if
(
estate
->
es_processed
>
0
)
portal
->
atStart
=
false
;
/* OK to back up now */
if
(
count
<=
0
||
(
int
)
estate
->
es_processed
<
count
)
...
...
@@ -187,6 +193,12 @@ PerformPortalFetch(char *name,
if
(
!
portal
->
atStart
)
{
ExecutorRun
(
queryDesc
,
estate
,
EXEC_BACK
,
(
long
)
count
);
/*
* I use CMD_UPDATE, because no CMD_MOVE or the like
* exists, and I would like to provide the same
* kind of info as CMD_UPDATE
*/
UpdateCommandInfo
(
CMD_UPDATE
,
0
,
estate
->
es_processed
);
if
(
estate
->
es_processed
>
0
)
portal
->
atEnd
=
false
;
/* OK to go forward now */
if
(
count
<=
0
||
(
int
)
estate
->
es_processed
<
count
)
...
...
src/backend/utils/adt/float.c
浏览文件 @
ba17165f
...
...
@@ -8,16 +8,16 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.7
3 2001/06/02 20:18:30 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.7
4 2001/06/07 00:09:29 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
/*----------
* OLD COMMENTS
* Basic float4 ops:
* float4in, float4out, float4abs, float4um
* float4in, float4out, float4abs, float4um
, float4up
* Basic float8 ops:
* float8in, float8out, float8abs, float8um
* float8in, float8out, float8abs, float8um
, float8up
* Arithmetic operators:
* float4pl, float4mi, float4mul, float4div
* float8pl, float8mi, float8mul, float8div
...
...
@@ -340,6 +340,13 @@ float4um(PG_FUNCTION_ARGS)
PG_RETURN_FLOAT4
((
float4
)
-
arg1
);
}
Datum
float4up
(
PG_FUNCTION_ARGS
)
{
float4
arg
=
PG_GETARG_FLOAT4
(
0
);
PG_RETURN_FLOAT4
(
arg
);
}
Datum
float4larger
(
PG_FUNCTION_ARGS
)
{
...
...
@@ -399,6 +406,13 @@ float8um(PG_FUNCTION_ARGS)
PG_RETURN_FLOAT8
(
result
);
}
Datum
float8up
(
PG_FUNCTION_ARGS
)
{
float8
arg
=
PG_GETARG_FLOAT8
(
0
);
PG_RETURN_FLOAT8
(
arg
);
}
Datum
float8larger
(
PG_FUNCTION_ARGS
)
{
...
...
src/backend/utils/adt/int.c
浏览文件 @
ba17165f
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.4
6 2001/03/22 03:59:51
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.4
7 2001/06/07 00:09:29
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -563,6 +563,14 @@ int4um(PG_FUNCTION_ARGS)
PG_RETURN_INT32
(
-
arg
);
}
Datum
int4up
(
PG_FUNCTION_ARGS
)
{
int32
arg
=
PG_GETARG_INT32
(
0
);
PG_RETURN_INT32
(
arg
);
}
Datum
int4pl
(
PG_FUNCTION_ARGS
)
{
...
...
@@ -615,6 +623,14 @@ int2um(PG_FUNCTION_ARGS)
PG_RETURN_INT16
(
-
arg
);
}
Datum
int2up
(
PG_FUNCTION_ARGS
)
{
int16
arg
=
PG_GETARG_INT16
(
0
);
PG_RETURN_INT16
(
arg
);
}
Datum
int2pl
(
PG_FUNCTION_ARGS
)
{
...
...
src/backend/utils/adt/int8.c
浏览文件 @
ba17165f
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int8.c,v 1.
29 2001/03/22 03:59:51
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int8.c,v 1.
30 2001/06/07 00:09:29
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -412,6 +412,14 @@ int8um(PG_FUNCTION_ARGS)
PG_RETURN_INT64
(
-
val
);
}
Datum
int8up
(
PG_FUNCTION_ARGS
)
{
int64
val
=
PG_GETARG_INT64
(
0
);
PG_RETURN_INT64
(
val
);
}
Datum
int8pl
(
PG_FUNCTION_ARGS
)
{
...
...
src/backend/utils/adt/numeric.c
浏览文件 @
ba17165f
...
...
@@ -5,7 +5,7 @@
*
* 1998 Jan Wieck
*
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.4
1 2001/05/03 19:00:36 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.4
2 2001/06/07 00:09:29 momjian
Exp $
*
* ----------
*/
...
...
@@ -405,6 +405,19 @@ numeric_uminus(PG_FUNCTION_ARGS)
}
Datum
numeric_uplus
(
PG_FUNCTION_ARGS
)
{
Numeric
num
=
PG_GETARG_NUMERIC
(
0
);
Numeric
res
;
res
=
(
Numeric
)
palloc
(
num
->
varlen
);
memcpy
(
res
,
num
,
num
->
varlen
);
PG_RETURN_NUMERIC
(
res
);
}
Datum
numeric_sign
(
PG_FUNCTION_ARGS
)
{
...
...
src/include/catalog/pg_operator.h
浏览文件 @
ba17165f
...
...
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_operator.h,v 1.8
8 2001/03/22 04:00:3
9 momjian Exp $
* $Id: pg_operator.h,v 1.8
9 2001/06/07 00:09:2
9 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
...
...
@@ -794,6 +794,13 @@ DATA(insert OID = 1889 ( "~" PGUID 0 l t f 0 20 20 0 0 0 0 int8not
DATA
(
insert
OID
=
1890
(
"<<"
PGUID
0
b
t
f
20
23
20
0
0
0
0
int8shl
-
-
));
DATA
(
insert
OID
=
1891
(
">>"
PGUID
0
b
t
f
20
23
20
0
0
0
0
int8shr
-
-
));
DATA
(
insert
OID
=
1916
(
"+"
PGUID
0
l
t
f
0
20
20
0
0
0
0
int8up
-
-
));
DATA
(
insert
OID
=
1917
(
"+"
PGUID
0
l
t
f
0
21
21
0
0
0
0
int2up
-
-
));
DATA
(
insert
OID
=
1918
(
"+"
PGUID
0
l
t
f
0
23
23
0
0
0
0
int4up
-
-
));
DATA
(
insert
OID
=
1919
(
"+"
PGUID
0
l
t
f
0
700
700
0
0
0
0
float4up
-
-
));
DATA
(
insert
OID
=
1920
(
"+"
PGUID
0
l
t
f
0
701
701
0
0
0
0
float8up
-
-
));
DATA
(
insert
OID
=
1921
(
"+"
PGUID
0
l
t
f
0
1700
1700
0
0
0
0
numeric_uplus
-
-
));
/*
* function prototypes
*/
...
...
src/include/catalog/pg_proc.h
浏览文件 @
ba17165f
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_proc.h,v 1.18
8 2001/05/24 09:29:29 petere
Exp $
* $Id: pg_proc.h,v 1.18
9 2001/06/07 00:09:30 momjian
Exp $
*
* NOTES
* The script catalog/genbki.sh reads this file and generates .bki
...
...
@@ -2614,6 +2614,19 @@ DESCR("binary shift left");
DATA
(
insert
OID
=
1909
(
int8shr
PGUID
12
f
t
t
t
2
f
20
"20 23"
100
0
0
100
int8shr
-
));
DESCR
(
"binary shift right"
);
DATA
(
insert
OID
=
1910
(
int8up
PGUID
12
f
t
t
t
1
f
20
"20"
100
0
0
100
int8up
-
));
DESCR
(
"unary plus"
);
DATA
(
insert
OID
=
1911
(
int2up
PGUID
12
f
t
t
t
1
f
21
"21"
100
0
0
100
int2up
-
));
DESCR
(
"unary plus"
);
DATA
(
insert
OID
=
1912
(
int4up
PGUID
12
f
t
t
t
1
f
23
"23"
100
0
0
100
int4up
-
));
DESCR
(
"unary plus"
);
DATA
(
insert
OID
=
1913
(
float4up
PGUID
12
f
t
t
t
1
f
700
"700"
100
0
0
100
float4up
-
));
DESCR
(
"unary plus"
);
DATA
(
insert
OID
=
1914
(
float8up
PGUID
12
f
t
t
t
1
f
701
"701"
100
0
0
100
float8up
-
));
DESCR
(
"unary plus"
);
DATA
(
insert
OID
=
1915
(
numeric_uplus
PGUID
12
f
t
t
t
1
f
1700
"1700"
100
0
0
100
numeric_uplus
-
));
DESCR
(
"unary plus"
);
/*
* prototypes for functions pg_proc.c
*/
...
...
src/include/utils/builtins.h
浏览文件 @
ba17165f
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: builtins.h,v 1.14
8 2001/03/22 04:01:1
1 momjian Exp $
* $Id: builtins.h,v 1.14
9 2001/06/07 00:09:3
1 momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -96,6 +96,7 @@ extern Datum int42le(PG_FUNCTION_ARGS);
extern
Datum
int42gt
(
PG_FUNCTION_ARGS
);
extern
Datum
int42ge
(
PG_FUNCTION_ARGS
);
extern
Datum
int4um
(
PG_FUNCTION_ARGS
);
extern
Datum
int4up
(
PG_FUNCTION_ARGS
);
extern
Datum
int4pl
(
PG_FUNCTION_ARGS
);
extern
Datum
int4mi
(
PG_FUNCTION_ARGS
);
extern
Datum
int4mul
(
PG_FUNCTION_ARGS
);
...
...
@@ -103,6 +104,7 @@ extern Datum int4div(PG_FUNCTION_ARGS);
extern
Datum
int4abs
(
PG_FUNCTION_ARGS
);
extern
Datum
int4inc
(
PG_FUNCTION_ARGS
);
extern
Datum
int2um
(
PG_FUNCTION_ARGS
);
extern
Datum
int2up
(
PG_FUNCTION_ARGS
);
extern
Datum
int2pl
(
PG_FUNCTION_ARGS
);
extern
Datum
int2mi
(
PG_FUNCTION_ARGS
);
extern
Datum
int2mul
(
PG_FUNCTION_ARGS
);
...
...
@@ -184,10 +186,12 @@ extern Datum float8in(PG_FUNCTION_ARGS);
extern
Datum
float8out
(
PG_FUNCTION_ARGS
);
extern
Datum
float4abs
(
PG_FUNCTION_ARGS
);
extern
Datum
float4um
(
PG_FUNCTION_ARGS
);
extern
Datum
float4up
(
PG_FUNCTION_ARGS
);
extern
Datum
float4larger
(
PG_FUNCTION_ARGS
);
extern
Datum
float4smaller
(
PG_FUNCTION_ARGS
);
extern
Datum
float8abs
(
PG_FUNCTION_ARGS
);
extern
Datum
float8um
(
PG_FUNCTION_ARGS
);
extern
Datum
float8up
(
PG_FUNCTION_ARGS
);
extern
Datum
float8larger
(
PG_FUNCTION_ARGS
);
extern
Datum
float8smaller
(
PG_FUNCTION_ARGS
);
extern
Datum
float4pl
(
PG_FUNCTION_ARGS
);
...
...
@@ -532,6 +536,7 @@ extern Datum numeric_out(PG_FUNCTION_ARGS);
extern
Datum
numeric
(
PG_FUNCTION_ARGS
);
extern
Datum
numeric_abs
(
PG_FUNCTION_ARGS
);
extern
Datum
numeric_uminus
(
PG_FUNCTION_ARGS
);
extern
Datum
numeric_uplus
(
PG_FUNCTION_ARGS
);
extern
Datum
numeric_sign
(
PG_FUNCTION_ARGS
);
extern
Datum
numeric_round
(
PG_FUNCTION_ARGS
);
extern
Datum
numeric_trunc
(
PG_FUNCTION_ARGS
);
...
...
src/include/utils/int8.h
浏览文件 @
ba17165f
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: int8.h,v 1.2
5 2001/01/24 19:43:28
momjian Exp $
* $Id: int8.h,v 1.2
6 2001/06/07 00:09:32
momjian Exp $
*
* NOTES
* These data types are supported on all 64-bit architectures, and may
...
...
@@ -66,6 +66,7 @@ extern Datum int28le(PG_FUNCTION_ARGS);
extern
Datum
int28ge
(
PG_FUNCTION_ARGS
);
extern
Datum
int8um
(
PG_FUNCTION_ARGS
);
extern
Datum
int8up
(
PG_FUNCTION_ARGS
);
extern
Datum
int8pl
(
PG_FUNCTION_ARGS
);
extern
Datum
int8mi
(
PG_FUNCTION_ARGS
);
extern
Datum
int8mul
(
PG_FUNCTION_ARGS
);
...
...
src/interfaces/jdbc/org/postgresql/Connection.java
浏览文件 @
ba17165f
...
...
@@ -10,7 +10,7 @@ import org.postgresql.largeobject.*;
import
org.postgresql.util.*
;
/**
* $Id: Connection.java,v 1.1
6 2001/06/01 20:57:58
momjian Exp $
* $Id: Connection.java,v 1.1
7 2001/06/07 00:09:32
momjian Exp $
*
* This abstract class is used by org.postgresql.Driver to open either the JDBC1 or
* JDBC2 versions of the Connection class.
...
...
@@ -505,7 +505,7 @@ public abstract class Connection
recv_status
=
pg_stream
.
ReceiveString
(
receive_sbuf
,
8192
,
getEncoding
());
// Now handle the update count correctly.
if
(
recv_status
.
startsWith
(
"INSERT"
)
||
recv_status
.
startsWith
(
"UPDATE"
)
||
recv_status
.
startsWith
(
"DELETE"
))
{
if
(
recv_status
.
startsWith
(
"INSERT"
)
||
recv_status
.
startsWith
(
"UPDATE"
)
||
recv_status
.
startsWith
(
"DELETE"
)
||
recv_status
.
startsWith
(
"MOVE"
)
)
{
try
{
update_count
=
Integer
.
parseInt
(
recv_status
.
substring
(
1
+
recv_status
.
lastIndexOf
(
' '
)));
}
catch
(
NumberFormatException
nfe
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录