Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
9710995f
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,发现更多精彩内容 >>
提交
9710995f
编写于
5月 22, 1999
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make postgres prompt backend>, and remove PARSEDEBUG.
上级
654f8f0b
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
7 addition
and
117 deletion
+7
-117
src/backend/parser/parse_clause.c
src/backend/parser/parse_clause.c
+1
-14
src/backend/parser/parse_coerce.c
src/backend/parser/parse_coerce.c
+3
-100
src/backend/tcop/postgres.c
src/backend/tcop/postgres.c
+3
-3
未找到文件。
src/backend/parser/parse_clause.c
浏览文件 @
9710995f
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.3
4 1999/05/17 18:22:18
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.3
5 1999/05/22 02:55:57
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -161,10 +161,6 @@ transformUsingClause(ParseState *pstate, List *onList, char *lname, char *rname)
Attr
*
rattr
=
makeAttr
(
rname
,
i
->
name
);
A_Expr
*
e
=
makeNode
(
A_Expr
);
#ifdef PARSEDEBUG
printf
(
"transformUsingClause- transform %s"
,
nodeToString
(
i
));
#endif
e
->
oper
=
OP
;
e
->
opname
=
"="
;
e
->
lexpr
=
(
Node
*
)
lattr
;
...
...
@@ -199,16 +195,7 @@ printf("transformUsingClause- transform %s", nodeToString(i));
{
expr
=
(
A_Expr
*
)
qual
;
}
#ifdef PARSEDEBUG
printf
(
"transformUsingClause- transform %s"
,
nodeToString
(
qual
));
#endif
}
#ifdef PARSEDEBUG
printf
(
" to %s
\n
"
,
nodeToString
(
expr
));
#endif
}
return
((
Node
*
)
transformExpr
(
pstate
,
(
Node
*
)
expr
,
EXPR_COLUMN_FIRST
));
}
...
...
src/backend/parser/parse_coerce.c
浏览文件 @
9710995f
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.1
3 1999/05/19 16:46:12
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.1
4 1999/05/22 02:55:57
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -41,18 +41,8 @@ coerce_type(ParseState *pstate, Node *node, Oid inputTypeId, Oid targetTypeId)
Oid
infunc
;
Datum
val
;
#ifdef PARSEDEBUG
printf
(
"coerce_type: argument types are %d -> %u
\n
"
,
inputTypeId
,
targetTypeId
);
#endif
if
(
targetTypeId
==
InvalidOid
)
{
#ifdef PARSEDEBUG
printf
(
"coerce_type: apparent NULL target argument; suppress type conversion
\n
"
);
#endif
result
=
node
;
}
else
if
(
inputTypeId
!=
targetTypeId
)
{
...
...
@@ -61,13 +51,7 @@ coerce_type(ParseState *pstate, Node *node, Oid inputTypeId, Oid targetTypeId)
* through...
*/
if
(
IS_BINARY_COMPATIBLE
(
inputTypeId
,
targetTypeId
))
{
#ifdef PARSEDEBUG
printf
(
"coerce_type: argument type %s is known to be convertible to type %s
\n
"
,
typeidTypeName
(
inputTypeId
),
typeidTypeName
(
targetTypeId
));
#endif
result
=
node
;
}
/*
* if not unknown input type, try for explicit conversion using
...
...
@@ -84,18 +68,10 @@ coerce_type(ParseState *pstate, Node *node, Oid inputTypeId, Oid targetTypeId)
n
->
funcname
=
typeidTypeName
(
targetTypeId
);
n
->
args
=
lcons
(
node
,
NIL
);
#ifdef PARSEDEBUG
printf
(
"coerce_type: construct function %s(%s)
\n
"
,
typeidTypeName
(
targetTypeId
),
typeidTypeName
(
inputTypeId
));
#endif
result
=
transformExpr
(
pstate
,
(
Node
*
)
n
,
EXPR_COLUMN_FIRST
);
}
else
{
#ifdef PARSEDEBUG
printf
(
"coerce_type: node is UNKNOWN type
\n
"
);
#endif
if
(
nodeTag
(
node
)
==
T_Const
)
{
Const
*
con
=
(
Const
*
)
node
;
...
...
@@ -117,22 +93,11 @@ coerce_type(ParseState *pstate, Node *node, Oid inputTypeId, Oid targetTypeId)
result
=
(
Node
*
)
con
;
}
else
{
#ifdef PARSEDEBUG
printf
(
"coerce_type: should never get here!
\n
"
);
#endif
result
=
node
;
}
}
}
else
{
#ifdef PARSEDEBUG
printf
(
"coerce_type: argument type IDs %u match
\n
"
,
inputTypeId
);
#endif
result
=
node
;
}
return
result
;
}
/* coerce_type() */
...
...
@@ -163,10 +128,6 @@ can_coerce_type(int nargs, Oid *input_typeids, Oid *func_typeids)
/* run through argument list... */
for
(
i
=
0
;
i
<
nargs
;
i
++
)
{
#ifdef PARSEDEBUG
printf
(
"can_coerce_type: argument #%d types are %u -> %u
\n
"
,
i
,
input_typeids
[
i
],
func_typeids
[
i
]);
#endif
if
(
input_typeids
[
i
]
!=
func_typeids
[
i
])
{
...
...
@@ -175,31 +136,14 @@ can_coerce_type(int nargs, Oid *input_typeids, Oid *func_typeids)
* through...
*/
if
(
IS_BINARY_COMPATIBLE
(
input_typeids
[
i
],
func_typeids
[
i
]))
{
#ifdef PARSEDEBUG
printf
(
"can_coerce_type: argument #%d type %s is known to be convertible to type %s
\n
"
,
i
,
typeidTypeName
(
input_typeids
[
i
]),
typeidTypeName
(
func_typeids
[
i
]));
#endif
}
;
/* don't know what to do for the output type? then quit... */
else
if
(
func_typeids
[
i
]
==
InvalidOid
)
{
#ifdef PARSEDEBUG
printf
(
"can_coerce_type: output OID func_typeids[%u] is zero
\n
"
,
i
);
#endif
return
false
;
}
/* don't know what to do for the input type? then quit... */
else
if
(
input_typeids
[
i
]
==
InvalidOid
)
{
#ifdef PARSEDEBUG
printf
(
"can_coerce_type: input OID input_typeids[%u] is zero
\n
"
,
i
);
#endif
return
false
;
}
/*
* if not unknown input type, try for explicit conversion
* using functions...
...
...
@@ -223,51 +167,13 @@ can_coerce_type(int nargs, Oid *input_typeids, Oid *func_typeids)
* should also check the function return type just to be
* safe...
*/
if
(
HeapTupleIsValid
(
ftup
))
{
#ifdef PARSEDEBUG
printf
(
"can_coerce_type: found function %s(%s) to convert argument #%d
\n
"
,
typeidTypeName
(
func_typeids
[
i
]),
typeidTypeName
(
input_typeids
[
i
]),
i
);
#endif
}
else
{
#ifdef PARSEDEBUG
printf
(
"can_coerce_type: did not find function %s(%s) to convert argument #%d
\n
"
,
typeidTypeName
(
func_typeids
[
i
]),
typeidTypeName
(
input_typeids
[
i
]),
i
);
#endif
if
(
!
HeapTupleIsValid
(
ftup
))
return
false
;
}
}
else
{
#ifdef PARSEDEBUG
printf
(
"can_coerce_type: argument #%d type is %u (UNKNOWN)
\n
"
,
i
,
input_typeids
[
i
]);
#endif
}
tp
=
typeidType
(
input_typeids
[
i
]);
if
(
typeTypeFlag
(
tp
)
==
'c'
)
{
#ifdef PARSEDEBUG
printf
(
"can_coerce_type: typeTypeFlag for %s is 'c'
\n
"
,
typeidTypeName
(
input_typeids
[
i
]));
#endif
return
false
;
}
#ifdef PARSEDEBUG
printf
(
"can_coerce_type: conversion from %s to %s is possible
\n
"
,
typeidTypeName
(
input_typeids
[
i
]),
typeidTypeName
(
func_typeids
[
i
]));
#endif
}
else
{
#ifdef PARSEDEBUG
printf
(
"can_coerce_type: argument #%d type IDs %u match
\n
"
,
i
,
input_typeids
[
i
]);
#endif
}
}
...
...
@@ -396,9 +302,6 @@ PreferredType(CATEGORY category, Oid type)
result
=
UNKNOWNOID
;
break
;
}
#ifdef PARSEDEBUG
printf
(
"PreferredType- (%d) preferred type is %s
\n
"
,
category
,
typeidTypeName
(
result
));
#endif
return
result
;
}
/* PreferredType() */
...
...
src/backend/tcop/postgres.c
浏览文件 @
9710995f
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.11
3 1999/05/13 07:28:46 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.11
4 1999/05/22 02:55:58 momjian
Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
...
...
@@ -215,7 +215,7 @@ InteractiveBackend(char *inBuf)
* display a prompt and obtain input from the user
* ----------------
*/
printf
(
"> "
);
printf
(
"
backend
> "
);
fflush
(
stdout
);
for
(;;)
...
...
@@ -1485,7 +1485,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
if
(
!
IsUnderPostmaster
)
{
puts
(
"
\n
POSTGRES backend interactive interface "
);
puts
(
"$Revision: 1.11
3 $ $Date: 1999/05/13 07:28:46
$
\n
"
);
puts
(
"$Revision: 1.11
4 $ $Date: 1999/05/22 02:55:58
$
\n
"
);
}
/* ----------------
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录