Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
c60f70b5
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,发现更多精彩内容 >>
提交
c60f70b5
编写于
12月 11, 1997
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename pg_plan and pg_eval to be more meaningful.
上级
645cc132
变更
11
显示空白变更内容
内联
并排
Showing
11 changed file
with
43 addition
and
40 deletion
+43
-40
src/backend/catalog/heap.c
src/backend/catalog/heap.c
+3
-3
src/backend/catalog/pg_proc.c
src/backend/catalog/pg_proc.c
+2
-2
src/backend/commands/_deadcode/version.c
src/backend/commands/_deadcode/version.c
+3
-3
src/backend/commands/dbcommands.c
src/backend/commands/dbcommands.c
+3
-3
src/backend/commands/user.c
src/backend/commands/user.c
+6
-6
src/backend/executor/functions.c
src/backend/executor/functions.c
+2
-2
src/backend/executor/spi.c
src/backend/executor/spi.c
+1
-1
src/backend/optimizer/path/xfunc.c
src/backend/optimizer/path/xfunc.c
+2
-2
src/backend/rewrite/rewriteDefine.c
src/backend/rewrite/rewriteDefine.c
+2
-2
src/backend/tcop/postgres.c
src/backend/tcop/postgres.c
+15
-12
src/include/tcop/tcopprot.h
src/include/tcop/tcopprot.h
+4
-4
未找到文件。
src/backend/catalog/heap.c
浏览文件 @
c60f70b5
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.4
0 1997/12/01 21:00:35
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.4
1 1997/12/11 17:35:59
momjian Exp $
*
* INTERFACE ROUTINES
* heap_create() - Create an uncataloged heap relation
...
...
@@ -1510,7 +1510,7 @@ start:;
sprintf
(
str
,
"select %s%s from %.*s"
,
attrdef
->
adsrc
,
cast
,
NAMEDATALEN
,
rel
->
rd_rel
->
relname
.
data
);
setheapoverride
(
true
);
planTree_list
=
(
List
*
)
pg_plan
(
str
,
NULL
,
0
,
&
queryTree_list
,
None
);
planTree_list
=
(
List
*
)
pg_p
arse_and_p
lan
(
str
,
NULL
,
0
,
&
queryTree_list
,
None
);
setheapoverride
(
false
);
query
=
(
Query
*
)
(
queryTree_list
->
qtrees
[
0
]);
...
...
@@ -1580,7 +1580,7 @@ StoreRelCheck(Relation rel, ConstrCheck *check)
sprintf
(
str
,
"select 1 from %.*s where %s"
,
NAMEDATALEN
,
rel
->
rd_rel
->
relname
.
data
,
check
->
ccsrc
);
setheapoverride
(
true
);
planTree_list
=
(
List
*
)
pg_plan
(
str
,
NULL
,
0
,
&
queryTree_list
,
None
);
planTree_list
=
(
List
*
)
pg_p
arse_and_p
lan
(
str
,
NULL
,
0
,
&
queryTree_list
,
None
);
setheapoverride
(
false
);
query
=
(
Query
*
)
(
queryTree_list
->
qtrees
[
0
]);
...
...
src/backend/catalog/pg_proc.c
浏览文件 @
c60f70b5
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.1
0 1997/11/25 21:58:48
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.1
1 1997/12/11 17:36:01
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -215,7 +215,7 @@ ProcedureCreate(char *procedureName,
if
(
strcmp
(
languageName
,
"sql"
)
==
0
)
{
plan_list
=
pg_plan
(
prosrc
,
typev
,
parameterCount
,
plan_list
=
pg_p
arse_and_p
lan
(
prosrc
,
typev
,
parameterCount
,
&
querytree_list
,
dest
);
/* typecheck return value */
...
...
src/backend/commands/_deadcode/version.c
浏览文件 @
c60f70b5
...
...
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/_deadcode/Attic/version.c,v 1.
8 1997/11/25 21:59:11
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/_deadcode/Attic/version.c,v 1.
9 1997/12/11 17:36:08
momjian Exp $
*
* NOTES
* At the point the version is defined, 2 physical relations are created
...
...
@@ -95,7 +95,7 @@ eval_as_new_xact(char *query)
* CommitTransactionCommand(); StartTransactionCommand();
*/
CommandCounterIncrement
();
pg_e
val
(
query
,
(
char
**
)
NULL
,
(
Oid
*
)
NULL
,
0
);
pg_e
xec_query
(
query
,
(
char
**
)
NULL
,
(
Oid
*
)
NULL
,
0
);
}
#endif
...
...
@@ -157,7 +157,7 @@ VersionCreate(char *vname, char *bname)
sprintf
(
query_buf
,
"SELECT * INTO TABLE %s from %s where 1 =2"
,
vname
,
bname
);
pg_e
val
(
query_buf
,
(
char
**
)
NULL
,
(
Oid
*
)
NULL
,
0
);
pg_e
xec_query
(
query_buf
,
(
char
**
)
NULL
,
(
Oid
*
)
NULL
,
0
);
/*
* Creating the ``v_added'' relation
...
...
src/backend/commands/dbcommands.c
浏览文件 @
c60f70b5
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.
2 1997/11/24 05:32:18
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.
3 1997/12/11 17:36:04
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -95,7 +95,7 @@ createdb(char *dbname, char *dbpath)
sprintf
(
buf
,
"insert into pg_database (datname, datdba, datpath)"
" values (
\'
%s
\'
,
\'
%d
\'
,
\'
%s
\'
);"
,
dbname
,
user_id
,
loc
);
pg_e
val
(
buf
,
(
char
**
)
NULL
,
(
Oid
*
)
NULL
,
0
);
pg_e
xec_query
(
buf
,
(
char
**
)
NULL
,
(
Oid
*
)
NULL
,
0
);
}
void
...
...
@@ -133,7 +133,7 @@ destroydb(char *dbname)
*/
sprintf
(
buf
,
"delete from pg_database where pg_database.oid =
\'
%d
\'
::oid"
,
db_id
);
pg_e
val
(
buf
,
(
char
**
)
NULL
,
(
Oid
*
)
NULL
,
0
);
pg_e
xec_query
(
buf
,
(
char
**
)
NULL
,
(
Oid
*
)
NULL
,
0
);
/*
* remove the data directory. If the DELETE above failed, this will
...
...
src/backend/commands/user.c
浏览文件 @
c60f70b5
/*-------------------------------------------------------------------------
*
* user.c--
* use pg_e
val
to create a new user in the catalog
* use pg_e
xec_query
to create a new user in the catalog
*
* Copyright (c) 1994, Regents of the University of California
*
...
...
@@ -43,7 +43,7 @@ void UpdatePgPwdFile(char* sql) {
filename
=
crypt_getpwdfilename
();
sprintf
(
sql
,
"copy %s to '%s' using delimiters '#'"
,
UserRelationName
,
filename
);
pg_e
val
(
sql
,
(
char
**
)
NULL
,
(
Oid
*
)
NULL
,
0
);
pg_e
xec_query
(
sql
,
(
char
**
)
NULL
,
(
Oid
*
)
NULL
,
0
);
}
/*---------------------------------------------------------------------
...
...
@@ -147,7 +147,7 @@ void DefineUser(CreateUserStmt *stmt) {
}
strcat
(
sql_end
,
")"
);
pg_e
val
(
sql
,
(
char
**
)
NULL
,
(
Oid
*
)
NULL
,
0
);
pg_e
xec_query
(
sql
,
(
char
**
)
NULL
,
(
Oid
*
)
NULL
,
0
);
/* Add the stuff here for groups.
*/
...
...
@@ -250,7 +250,7 @@ extern void AlterUser(AlterUserStmt *stmt) {
if
(
sql_end
!=
sql
)
{
sql_end
+=
strlen
(
sql_end
);
sprintf
(
sql_end
,
" where usename = '%s'"
,
stmt
->
user
);
pg_e
val
(
sql
,
(
char
**
)
NULL
,
(
Oid
*
)
NULL
,
0
);
pg_e
xec_query
(
sql
,
(
char
**
)
NULL
,
(
Oid
*
)
NULL
,
0
);
}
/* do the pg_group stuff here */
...
...
@@ -346,7 +346,7 @@ extern void RemoveUser(char* user) {
elog
(
NOTICE
,
"Dropping database %s"
,
dbase
[
ndbase
]);
sprintf
(
sql
,
"drop database %s"
,
dbase
[
ndbase
]);
pfree
((
void
*
)
dbase
[
ndbase
]);
pg_e
val
(
sql
,
(
char
**
)
NULL
,
(
Oid
*
)
NULL
,
0
);
pg_e
xec_query
(
sql
,
(
char
**
)
NULL
,
(
Oid
*
)
NULL
,
0
);
}
if
(
dbase
)
pfree
((
void
*
)
dbase
);
...
...
@@ -369,7 +369,7 @@ extern void RemoveUser(char* user) {
/* Remove the user from the pg_user table
*/
sprintf
(
sql
,
"delete from %s where usename = '%s'"
,
UserRelationName
,
user
);
pg_e
val
(
sql
,
(
char
**
)
NULL
,
(
Oid
*
)
NULL
,
0
);
pg_e
xec_query
(
sql
,
(
char
**
)
NULL
,
(
Oid
*
)
NULL
,
0
);
UpdatePgPwdFile
(
sql
);
...
...
src/backend/executor/functions.c
浏览文件 @
c60f70b5
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.1
3 1997/11/25 21:59:19
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.1
4 1997/12/11 17:36:16
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -113,7 +113,7 @@ init_execution_state(FunctionCachePtr fcache,
planTree_list
=
(
List
*
)
pg_plan
(
fcache
->
src
,
fcache
->
argOidVect
,
nargs
,
&
queryTree_list
,
None
);
pg_p
arse_and_p
lan
(
fcache
->
src
,
fcache
->
argOidVect
,
nargs
,
&
queryTree_list
,
None
);
for
(
i
=
0
;
i
<
queryTree_list
->
len
;
i
++
)
{
...
...
src/backend/executor/spi.c
浏览文件 @
c60f70b5
...
...
@@ -640,7 +640,7 @@ _SPI_execute(char *src, int tcount, _SPI_plan * plan)
argtypes
=
plan
->
argtypes
;
}
ptlist
=
planTree_list
=
(
List
*
)
pg_plan
(
src
,
argtypes
,
nargs
,
&
queryTree_list
,
None
);
pg_p
arse_and_p
lan
(
src
,
argtypes
,
nargs
,
&
queryTree_list
,
None
);
_SPI_current
->
qtlist
=
queryTree_list
;
...
...
src/backend/optimizer/path/xfunc.c
浏览文件 @
c60f70b5
...
...
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/xfunc.c,v 1.
7 1997/11/25 21:59:50
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/xfunc.c,v 1.
8 1997/12/11 17:36:29
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -534,7 +534,7 @@ xfunc_func_expense(LispValue node, LispValue args)
nargs
=
proc
->
pronargs
;
if
(
nargs
>
0
)
argOidVect
=
proc
->
proargtypes
;
planlist
=
(
List
)
pg_plan
(
pq_src
,
argOidVect
,
nargs
,
planlist
=
(
List
)
pg_p
arse_and_p
lan
(
pq_src
,
argOidVect
,
nargs
,
&
parseTree_list
,
None
);
if
(
IsA
(
node
,
Func
))
set_func_planlist
((
Func
)
node
,
planlist
);
...
...
src/backend/rewrite/rewriteDefine.c
浏览文件 @
c60f70b5
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.
8 1997/11/25 22:06:04
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.
9 1997/12/11 17:36:38
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -136,7 +136,7 @@ InsertRule(char *rulname,
rulname
,
evtype
,
eventrel_oid
,
evslot_index
,
actionbuf
,
qualbuf
,
is_instead
);
pg_e
val
(
rulebuf
,
(
char
**
)
NULL
,
(
Oid
*
)
NULL
,
0
);
pg_e
xec_query
(
rulebuf
,
(
char
**
)
NULL
,
(
Oid
*
)
NULL
,
0
);
return
(
LastOidProcessed
);
}
...
...
src/backend/tcop/postgres.c
浏览文件 @
c60f70b5
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.5
5 1997/11/25 22:06:14
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.5
6 1997/12/11 17:36:42
momjian Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
...
...
@@ -395,7 +395,7 @@ ReadCommand(char *inBuf, bool multiplexedBackend)
}
List
*
pg_plan
(
char
*
query_string
,
/* string to execute */
pg_p
arse_and_p
lan
(
char
*
query_string
,
/* string to execute */
Oid
*
typev
,
/* argument types */
int
nargs
,
/* number of arguments */
QueryTreeList
**
queryListP
,
/* pointer to the parse trees */
...
...
@@ -537,7 +537,10 @@ pg_plan(char *query_string, /* string to execute */
if
(
ShowPlannerStats
)
ResetUsage
();
/* call that optimizer */
plan
=
planner
(
querytree
);
if
(
ShowPlannerStats
)
{
fprintf
(
stderr
,
"! Planner Stats:
\n
"
);
...
...
@@ -580,7 +583,7 @@ pg_plan(char *query_string, /* string to execute */
}
/* ----------------------------------------------------------------
* pg_e
val
()
* pg_e
xec_query
()
*
* Takes a querystring, runs the parser/utilities or
* parser/planner/executor over it as necessary
...
...
@@ -597,13 +600,13 @@ pg_plan(char *query_string, /* string to execute */
*/
void
pg_e
val
(
char
*
query_string
,
char
**
argv
,
Oid
*
typev
,
int
nargs
)
pg_e
xec_query
(
char
*
query_string
,
char
**
argv
,
Oid
*
typev
,
int
nargs
)
{
pg_e
val
_dest
(
query_string
,
argv
,
typev
,
nargs
,
whereToSendOutput
);
pg_e
xec_query
_dest
(
query_string
,
argv
,
typev
,
nargs
,
whereToSendOutput
);
}
void
pg_e
val
_dest
(
char
*
query_string
,
/* string to execute */
pg_e
xec_query
_dest
(
char
*
query_string
,
/* string to execute */
char
**
argv
,
/* arguments */
Oid
*
typev
,
/* argument types */
int
nargs
,
/* number of arguments */
...
...
@@ -617,9 +620,9 @@ pg_eval_dest(char *query_string,/* string to execute */
QueryTreeList
*
querytree_list
;
/* plan the queries */
plan_list
=
pg_plan
(
query_string
,
typev
,
nargs
,
&
querytree_list
,
dest
);
plan_list
=
pg_p
arse_and_p
lan
(
query_string
,
typev
,
nargs
,
&
querytree_list
,
dest
);
/* pg_plan could have failed */
/* pg_p
arse_and_p
lan could have failed */
if
(
querytree_list
==
NULL
)
return
;
...
...
@@ -668,7 +671,7 @@ pg_eval_dest(char *query_string,/* string to execute */
#ifdef INDEXSCAN_PATCH
/*
* Print moved in pg_plan. DZ - 27-8-1996
* Print moved in pg_p
arse_and_p
lan. DZ - 27-8-1996
*/
#else
/* ----------------
...
...
@@ -1340,7 +1343,7 @@ PostgresMain(int argc, char *argv[])
if
(
IsUnderPostmaster
==
false
)
{
puts
(
"
\n
POSTGRES backend interactive interface"
);
puts
(
"$Revision: 1.5
5 $ $Date: 1997/11/25 22:06:14
$"
);
puts
(
"$Revision: 1.5
6 $ $Date: 1997/12/11 17:36:42
$"
);
}
/* ----------------
...
...
@@ -1510,7 +1513,7 @@ PostgresMain(int argc, char *argv[])
}
StartTransactionCommand
();
pg_e
val
(
parser_input
,
(
char
**
)
NULL
,
(
Oid
*
)
NULL
,
0
);
pg_e
xec_query
(
parser_input
,
(
char
**
)
NULL
,
(
Oid
*
)
NULL
,
0
);
if
(
ShowStats
)
ShowUsage
();
...
...
@@ -1540,7 +1543,7 @@ PostgresMain(int argc, char *argv[])
* (3) commit the current transaction
*
* Note: if we had an empty input buffer, then we didn't
* call pg_e
val
, so we don't bother to commit this transaction.
* call pg_e
xec_query
, so we don't bother to commit this transaction.
* ----------------
*/
if
(
!
IsEmptyQuery
)
...
...
src/include/tcop/tcopprot.h
浏览文件 @
c60f70b5
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: tcopprot.h,v 1.
8 1997/11/25 22:07:10
momjian Exp $
* $Id: tcopprot.h,v 1.
9 1997/12/11 17:36:58
momjian Exp $
*
* OLD COMMENTS
* This file was created so that other c files could get the two
...
...
@@ -23,11 +23,11 @@
#ifndef BOOTSTRAP_INCLUDE
extern
List
*
pg_plan
(
char
*
query_string
,
Oid
*
typev
,
int
nargs
,
pg_p
arse_and_p
lan
(
char
*
query_string
,
Oid
*
typev
,
int
nargs
,
QueryTreeList
**
queryListP
,
CommandDest
dest
);
extern
void
pg_e
val
(
char
*
query_string
,
char
**
argv
,
Oid
*
typev
,
int
nargs
);
extern
void
pg_e
xec_query
(
char
*
query_string
,
char
**
argv
,
Oid
*
typev
,
int
nargs
);
extern
void
pg_e
val
_dest
(
char
*
query_string
,
char
**
argv
,
Oid
*
typev
,
pg_e
xec_query
_dest
(
char
*
query_string
,
char
**
argv
,
Oid
*
typev
,
int
nargs
,
CommandDest
dest
);
#endif
/* BOOTSTRAP_HEADER */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录