Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
134bed80
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,发现更多精彩内容 >>
提交
134bed80
编写于
11月 09, 2005
作者:
T
Teodor Sigaev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix rwrite(ARRAY) on 64-bit boxes:
Instead of getting elements of array manually call deconstruct_array
上级
0645663e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
22 addition
and
11 deletion
+22
-11
contrib/tsearch2/expected/tsearch2.out
contrib/tsearch2/expected/tsearch2.out
+4
-4
contrib/tsearch2/query_rewrite.c
contrib/tsearch2/query_rewrite.c
+17
-7
contrib/tsearch2/tsearch.sql.in
contrib/tsearch2/tsearch.sql.in
+1
-0
未找到文件。
contrib/tsearch2/expected/tsearch2.out
浏览文件 @
134bed80
...
...
@@ -13,12 +13,12 @@ psql:tsearch2.sql:342: NOTICE: argument type tsvector is only a shell
psql:tsearch2.sql:396: NOTICE: type "tsquery" is not yet defined
DETAIL: Creating a shell type definition.
psql:tsearch2.sql:401: NOTICE: argument type tsquery is only a shell
psql:tsearch2.sql:54
3
: NOTICE: type "gtsvector" is not yet defined
psql:tsearch2.sql:54
4
: NOTICE: type "gtsvector" is not yet defined
DETAIL: Creating a shell type definition.
psql:tsearch2.sql:54
8
: NOTICE: argument type gtsvector is only a shell
psql:tsearch2.sql:99
7
: NOTICE: type "gtsq" is not yet defined
psql:tsearch2.sql:54
9
: NOTICE: argument type gtsvector is only a shell
psql:tsearch2.sql:99
8
: NOTICE: type "gtsq" is not yet defined
DETAIL: Creating a shell type definition.
psql:tsearch2.sql:100
2
: NOTICE: argument type gtsq is only a shell
psql:tsearch2.sql:100
3
: NOTICE: argument type gtsq is only a shell
--tsvector
SELECT '1'::tsvector;
tsvector
...
...
contrib/tsearch2/query_rewrite.c
浏览文件 @
134bed80
...
...
@@ -201,6 +201,8 @@ rewrite_accum(PG_FUNCTION_ARGS) {
QUERYTYPE
*
q
;
QTNode
*
qex
,
*
subs
=
NULL
,
*
acctree
;
bool
isfind
=
false
;
Datum
*
elemsp
;
int
nelemsp
;
AggregateContext
=
((
AggState
*
)
fcinfo
->
context
)
->
aggcontext
;
...
...
@@ -230,14 +232,19 @@ rewrite_accum(PG_FUNCTION_ARGS) {
if
(
ARR_ELEMTYPE
(
qa
)
!=
tsqOid
)
elog
(
ERROR
,
"array should contain tsquery type"
);
q
=
(
QUERYTYPE
*
)
ARR_DATA_PTR
(
qa
);
if
(
q
->
size
==
0
)
deconstruct_array
(
qa
,
tsqOid
,
-
1
,
false
,
'i'
,
&
elemsp
,
&
nelemsp
);
q
=
(
QUERYTYPE
*
)
DatumGetPointer
(
elemsp
[
0
]
);
if
(
q
->
size
==
0
)
{
pfree
(
elemsp
);
PG_RETURN_POINTER
(
acc
);
}
if
(
!
acc
->
size
)
{
if
(
acc
->
len
>
HDRSIZEQT
)
if
(
acc
->
len
>
HDRSIZEQT
)
{
pfree
(
elemsp
);
PG_RETURN_POINTER
(
acc
);
else
}
else
acctree
=
QT2QTN
(
GETQUERY
(
q
),
GETOPERAND
(
q
)
);
}
else
acctree
=
QT2QTN
(
GETQUERY
(
acc
),
GETOPERAND
(
acc
)
);
...
...
@@ -245,14 +252,16 @@ rewrite_accum(PG_FUNCTION_ARGS) {
QTNTernary
(
acctree
);
QTNSort
(
acctree
);
q
=
(
QUERYTYPE
*
)(
((
char
*
)
ARR_DATA_PTR
(
qa
))
+
MAXALIGN
(
q
->
len
)
);
if
(
q
->
size
==
0
)
q
=
(
QUERYTYPE
*
)
DatumGetPointer
(
elemsp
[
1
]
);
if
(
q
->
size
==
0
)
{
pfree
(
elemsp
);
PG_RETURN_POINTER
(
acc
);
}
qex
=
QT2QTN
(
GETQUERY
(
q
),
GETOPERAND
(
q
)
);
QTNTernary
(
qex
);
QTNSort
(
qex
);
q
=
(
QUERYTYPE
*
)
(
((
char
*
)
q
)
+
MAXALIGN
(
q
->
len
)
);
q
=
(
QUERYTYPE
*
)
DatumGetPointer
(
elemsp
[
2
]
);
if
(
q
->
size
)
subs
=
QT2QTN
(
GETQUERY
(
q
),
GETOPERAND
(
q
)
);
...
...
@@ -270,6 +279,7 @@ rewrite_accum(PG_FUNCTION_ARGS) {
}
}
pfree
(
elemsp
);
QTNFree
(
qex
);
QTNFree
(
subs
);
QTNFree
(
acctree
);
...
...
contrib/tsearch2/tsearch.sql.in
浏览文件 @
134bed80
...
...
@@ -402,6 +402,7 @@ LANGUAGE 'C' with (isstrict);
CREATE TYPE tsquery (
INTERNALLENGTH = -1,
ALIGNMENT = int4,
INPUT = tsquery_in,
OUTPUT = tsquery_out
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录