Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
6b0e1666
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,发现更多精彩内容 >>
提交
6b0e1666
编写于
10月 16, 2002
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Improve appearance of SET command.
上级
5d8c6746
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
20 addition
and
20 deletion
+20
-20
src/bin/scripts/clusterdb
src/bin/scripts/clusterdb
+2
-2
src/bin/scripts/createdb
src/bin/scripts/createdb
+3
-3
src/bin/scripts/createlang.sh
src/bin/scripts/createlang.sh
+4
-4
src/bin/scripts/createuser
src/bin/scripts/createuser
+2
-2
src/bin/scripts/dropdb
src/bin/scripts/dropdb
+2
-2
src/bin/scripts/droplang
src/bin/scripts/droplang
+3
-3
src/bin/scripts/dropuser
src/bin/scripts/dropuser
+2
-2
src/bin/scripts/vacuumdb
src/bin/scripts/vacuumdb
+2
-2
未找到文件。
src/bin/scripts/clusterdb
浏览文件 @
6b0e1666
...
...
@@ -11,7 +11,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/clusterdb,v 1.
5 2002/10/16 03:24:09
momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/clusterdb,v 1.
6 2002/10/16 03:44:28
momjian Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -176,7 +176,7 @@ do
idx
=
`
echo
$tabs
|
cut
-d
:
-f3
`
query
=
"
$query
CLUSTER
$idx
ON
$nspc
.
$tab
;"
done
${
PATHNAME
}
psql
$PSQLOPT
$ECHOOPT
-c
"SET autocommit
=
'on';
$query
"
-d
$db
${
PATHNAME
}
psql
$PSQLOPT
$ECHOOPT
-c
"SET autocommit
TO
'on';
$query
"
-d
$db
if
[
"
$?
"
-ne
0
]
then
echo
"
$CMDNAME
: While clustering
$db
, the following failed:
$query
"
1>&2
...
...
src/bin/scripts/createdb
浏览文件 @
6b0e1666
...
...
@@ -12,7 +12,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createdb,v 1.2
6 2002/10/16 03:24:09
momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createdb,v 1.2
7 2002/10/16 03:44:28
momjian Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -189,7 +189,7 @@ withstring=
[
"
$TEMPLATE
"
]
&&
withstring
=
"
$withstring
TEMPLATE =
\"
$TEMPLATE
\"
"
[
"
$withstring
"
]
&&
withstring
=
" WITH
$withstring
"
${
PATHNAME
}
psql
$PSQLOPT
-d
template1
-c
"SET autocommit
=
'on';CREATE DATABASE
\"
$dbname
\"
$withstring
"
${
PATHNAME
}
psql
$PSQLOPT
-d
template1
-c
"SET autocommit
TO
'on';CREATE DATABASE
\"
$dbname
\"
$withstring
"
if
[
"
$?
"
-ne
0
]
;
then
echo
"
$CMDNAME
: database creation failed"
1>&2
exit
1
...
...
@@ -200,7 +200,7 @@ fi
dbcomment
=
`
echo
"
$dbcomment
"
|
sed
"s/'/
\\\\\'
/g"
`
${
PATHNAME
}
psql
$PSQLOPT
-d
"
$dbname
"
-c
"SET autocommit
=
'on';COMMENT ON DATABASE
\"
$dbname
\"
IS '
$dbcomment
'"
${
PATHNAME
}
psql
$PSQLOPT
-d
"
$dbname
"
-c
"SET autocommit
TO
'on';COMMENT ON DATABASE
\"
$dbname
\"
IS '
$dbcomment
'"
if
[
"
$?
"
-ne
0
]
;
then
echo
"
$CMDNAME
: comment creation failed (database was created)"
1>&2
exit
1
...
...
src/bin/scripts/createlang.sh
浏览文件 @
6b0e1666
...
...
@@ -7,7 +7,7 @@
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.4
0 2002/10/16 03:24:09
momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.4
1 2002/10/16 03:44:28
momjian Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -270,7 +270,7 @@ fi
# Create the call handler and the language
# ----------
if
[
"
$handlerexists
"
=
no
]
;
then
sqlcmd
=
"SET autocommit
=
'on';CREATE FUNCTION
\"
$handler
\"
() RETURNS LANGUAGE_HANDLER AS '
$PGLIB
/
${
object
}
' LANGUAGE C;"
sqlcmd
=
"SET autocommit
TO
'on';CREATE FUNCTION
\"
$handler
\"
() RETURNS LANGUAGE_HANDLER AS '
$PGLIB
/
${
object
}
' LANGUAGE C;"
if
[
"
$showsql
"
=
yes
]
;
then
echo
"
$sqlcmd
"
fi
...
...
@@ -281,7 +281,7 @@ if [ "$handlerexists" = no ]; then
fi
fi
sqlcmd
=
"SET autocommit
=
'on';CREATE
${
trusted
}
LANGUAGE
\"
$langname
\"
HANDLER
\"
$handler
\"
;"
sqlcmd
=
"SET autocommit
TO
'on';CREATE
${
trusted
}
LANGUAGE
\"
$langname
\"
HANDLER
\"
$handler
\"
;"
if
[
"
$showsql
"
=
yes
]
;
then
echo
"
$sqlcmd
"
fi
...
...
@@ -297,7 +297,7 @@ fi
# seems best to disable public USAGE for an untrusted one.
# ----------
if
test
-z
"
$trusted
"
;
then
sqlcmd
=
"SET autocommit
=
'on';REVOKE ALL ON LANGUAGE
\"
$langname
\"
FROM PUBLIC;"
sqlcmd
=
"SET autocommit
TO
'on';REVOKE ALL ON LANGUAGE
\"
$langname
\"
FROM PUBLIC;"
if
[
"
$showsql
"
=
yes
]
;
then
echo
"
$sqlcmd
"
fi
...
...
src/bin/scripts/createuser
浏览文件 @
6b0e1666
...
...
@@ -9,7 +9,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createuser,v 1.2
7 2002/10/16 03:24:09
momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createuser,v 1.2
8 2002/10/16 03:44:28
momjian Exp $
#
# Note - this should NOT be setuid.
#
...
...
@@ -253,7 +253,7 @@ SUBQUERY=
[
"
$CanAddUser
"
=
t
]
&&
QUERY
=
"
$QUERY
CREATEUSER"
[
"
$CanAddUser
"
=
f
]
&&
QUERY
=
"
$QUERY
NOCREATEUSER"
${
PATHNAME
}
psql
-c
"SET autocommit
=
'on';
$QUERY
"
-d
template1
$PSQLOPT
${
PATHNAME
}
psql
-c
"SET autocommit
TO
'on';
$QUERY
"
-d
template1
$PSQLOPT
if
[
"
$?
"
-ne
0
]
;
then
echo
"
$CMDNAME
: creation of user
\"
$NewUser
\"
failed"
1>&2
exit
1
...
...
src/bin/scripts/dropdb
浏览文件 @
6b0e1666
...
...
@@ -11,7 +11,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/dropdb,v 1.1
7 2002/10/16 03:24:09
momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/dropdb,v 1.1
8 2002/10/16 03:44:28
momjian Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -138,7 +138,7 @@ fi
dbname
=
`
echo
"
$dbname
"
|
sed
's/\"/\\\"/g'
`
${
PATHNAME
}
psql
$PSQLOPT
-d
template1
-c
"SET autocommit
=
'on';DROP DATABASE
\"
$dbname
\"
"
${
PATHNAME
}
psql
$PSQLOPT
-d
template1
-c
"SET autocommit
TO
'on';DROP DATABASE
\"
$dbname
\"
"
if
[
"
$?
"
-ne
0
]
;
then
echo
"
$CMDNAME
: database removal failed"
1>&2
exit
1
...
...
src/bin/scripts/droplang
浏览文件 @
6b0e1666
...
...
@@ -7,7 +7,7 @@
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/droplang,v 1.2
5 2002/10/16 03:24:09
momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/droplang,v 1.2
6 2002/10/16 03:44:28
momjian Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -229,7 +229,7 @@ fi
# ----------
# Drop the language
# ----------
sqlcmd
=
"SET autocommit
=
'on';DROP LANGUAGE
\"
$langname
\"
;"
sqlcmd
=
"SET autocommit
TO
'on';DROP LANGUAGE
\"
$langname
\"
;"
if
[
"
$showsql
"
=
yes
]
;
then
echo
"
$sqlcmd
"
fi
...
...
@@ -256,7 +256,7 @@ if [ "$?" -ne 0 ]; then
exit
1
fi
sqlcmd
=
"SET autocommit
=
'on';DROP FUNCTION
\"
$handler
\"
();"
sqlcmd
=
"SET autocommit
TO
'on';DROP FUNCTION
\"
$handler
\"
();"
if
[
"
$showsql
"
=
yes
]
;
then
echo
"
$sqlcmd
"
fi
...
...
src/bin/scripts/dropuser
浏览文件 @
6b0e1666
...
...
@@ -9,7 +9,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/dropuser,v 1.
19 2002/10/16 03:24:09
momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/dropuser,v 1.
20 2002/10/16 03:44:28
momjian Exp $
#
# Note - this should NOT be setuid.
#
...
...
@@ -148,7 +148,7 @@ fi
DelUser
=
`
echo
"
$DelUser
"
|
sed
's/\"/\\\"/g'
`
${
PATHNAME
}
psql
$PSQLOPT
-d
template1
-c
"SET autocommit
=
'on';DROP USER
\"
$DelUser
\"
"
${
PATHNAME
}
psql
$PSQLOPT
-d
template1
-c
"SET autocommit
TO
'on';DROP USER
\"
$DelUser
\"
"
if
[
"
$?
"
-ne
0
]
;
then
echo
"
$CMDNAME
: deletion of user
\"
$DelUser
\"
failed"
1>&2
...
...
src/bin/scripts/vacuumdb
浏览文件 @
6b0e1666
...
...
@@ -12,7 +12,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/vacuumdb,v 1.2
4 2002/10/16 03:24:09
momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/vacuumdb,v 1.2
5 2002/10/16 03:44:28
momjian Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -169,7 +169,7 @@ fi
for
db
in
$dbname
do
[
"
$alldb
"
-a
"
$quiet
"
-ne
1
]
&&
echo
"Vacuuming
$db
"
${
PATHNAME
}
psql
$PSQLOPT
$ECHOOPT
-c
"SET autocommit
=
'on';VACUUM
$full
$verbose
$analyze
$table
"
-d
$db
${
PATHNAME
}
psql
$PSQLOPT
$ECHOOPT
-c
"SET autocommit
TO
'on';VACUUM
$full
$verbose
$analyze
$table
"
-d
$db
if
[
"
$?
"
-ne
0
]
;
then
echo
"
$CMDNAME
: vacuum
$table
$db
failed"
1>&2
exit
1
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录