Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
2fb0ff0c
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,发现更多精彩内容 >>
提交
2fb0ff0c
编写于
2月 10, 2000
作者:
P
Peter Eisentraut
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Default argument for createdb
Changed EXIT_ON_ERROR to ON_ERROR_STOP in psql
上级
7528fd2d
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
38 addition
and
33 deletion
+38
-33
doc/src/sgml/ref/createdb.sgml
doc/src/sgml/ref/createdb.sgml
+3
-1
doc/src/sgml/ref/psql-ref.sgml
doc/src/sgml/ref/psql-ref.sgml
+23
-23
src/bin/psql/help.c
src/bin/psql/help.c
+2
-2
src/bin/psql/mainloop.c
src/bin/psql/mainloop.c
+2
-2
src/bin/scripts/createdb
src/bin/scripts/createdb
+8
-5
未找到文件。
doc/src/sgml/ref/createdb.sgml
浏览文件 @
2fb0ff0c
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/createdb.sgml,v 1.
8 1999/12/07 22:41:41 momjian
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/createdb.sgml,v 1.
9 2000/02/10 20:08:55 petere
Exp $
Postgres documentation
-->
...
...
@@ -121,6 +121,8 @@ createdb [ <replaceable class="parameter">options</replaceable> ] <replaceable c
<para>
Specifies the name of the database to be created. The name must be
unique among all <productname>PostgreSQL</productname> databases in this installation.
The default is to create a database with the same name as the
current system user.
</para>
</listitem>
</varlistentry>
...
...
doc/src/sgml/ref/psql-ref.sgml
浏览文件 @
2fb0ff0c
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.2
3 2000/02/07 23:10:03
petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.2
4 2000/02/10 20:08:55
petere Exp $
Postgres documentation
-->
...
...
@@ -1644,24 +1644,6 @@ bar
</listitem>
</varlistentry>
<varlistentry>
<term><envar>EXIT_ON_ERROR</envar></term>
<listitem>
<para>
By default, if non-interactive scripts encounter an error, such as a
malformed <acronym>SQL</acronym> query or internal meta-command,
processing continues. This is has been the traditional behaviour of
<application>psql</application>but is often less than desirable. If this variable
is set, script processing will immediately terminate. If the script was
called from another script it will terminate in the same fashion.
If the outermost script was not called from an interactive <application>psql</application>
session but rather using the <option>-f</option> option, <application>psql</application>
will return error code 3, to distinguish this case from fatal
error conditions (error code 1).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><envar>HISTCONTROL</envar></term>
<listitem>
...
...
@@ -1766,6 +1748,24 @@ bar
</listitem>
</varlistentry>
<varlistentry>
<term><envar>ON_ERROR_STOP</envar></term>
<listitem>
<para>
By default, if non-interactive scripts encounter an error, such as a
malformed <acronym>SQL</acronym> query or internal meta-command,
processing continues. This is has been the traditional behaviour of
<application>psql</application> but it is sometimes not desirable. If this variable
is set, script processing will immediately terminate. If the script was
called from another script it will terminate in the same fashion.
If the outermost script was not called from an interactive <application>psql</application>
session but rather using the <option>-f</option> option, <application>psql</application>
will return error code 3, to distinguish this case from fatal
error conditions (error code 1).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><envar>PORT</envar></term>
<listitem>
...
...
@@ -1886,7 +1886,7 @@ testdb=> <userinput>\set content `sed -e "s/'/\\\\\\'/g" < my_file.txt`</userinp
<para>
Since colons may legally appear in queries, the following rule applies: If the variable
is not set, the character sequence <quote>colon
name</quote> is not changed. In any
is not set, the character sequence <quote>colon
+
name</quote> is not changed. In any
case you can escape a colon with a backslash to protect it from interpretation.
(The colon syntax for variables is standard <acronym>SQL</acronym> for embedded
query languages, such as <application>ecpg</application>. The colon syntax for
...
...
@@ -1987,8 +1987,8 @@ testdb=> <userinput>\set content `sed -e "s/'/\\\\\\'/g" < my_file.txt`</userinp
<varlistentry>
<term><literal>%:</literal><replaceable class="parameter">name</replaceable><literal>:</literal></term>
<listitem><para>
The value of the <application>psql</application>,
<quote>magic</quote>, or environment
variable <replaceable
class="parameter">name</replaceable>. See the section
The value of the <application>psql</application>,
variable <replaceable
class="parameter">name</replaceable>. See the section
<quote><xref linkend="APP-PSQL-variables" endterm="APP-PSQL-variables-title"></quote>
for details.</para>
</listitem>
...
...
@@ -2024,7 +2024,7 @@ testdb=> <userinput>\set content `sed -e "s/'/\\\\\\'/g" < my_file.txt`</userinp
<application>psql</application> returns 0 to the shell if it finished normally,
1 if a fatal error of its own (out of memory, file not found) occurs, 2 if the
connection to the backend went bad and the session is not interactive, and 3 if
an error occurred in a script and the variable <envar>
EXIT_ON_ERROR
</envar> was
an error occurred in a script and the variable <envar>
ON_ERROR_STOP
</envar> was
set.
</para>
...
...
src/bin/psql/help.c
浏览文件 @
2fb0ff0c
...
...
@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.1
6 2000/02/07 23:10:0
6 petere Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.1
7 2000/02/10 20:08:5
6 petere Exp $
*/
#include <c.h>
#include "help.h"
...
...
@@ -54,7 +54,7 @@ usage(void)
if
(
!
user
)
{
#ifndef WIN32
pw
=
getpwuid
(
getuid
());
pw
=
getpwuid
(
get
e
uid
());
if
(
pw
)
user
=
pw
->
pw_name
;
else
...
...
src/bin/psql/mainloop.c
浏览文件 @
2fb0ff0c
...
...
@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.1
7 2000/02/07 23:10:0
6 petere Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.1
8 2000/02/10 20:08:5
6 petere Exp $
*/
#include <c.h>
#include "mainloop.h"
...
...
@@ -138,7 +138,7 @@ MainLoop(FILE *source)
/* Setting this will not have effect until next line. */
die_on_error
=
GetVariableBool
(
pset
.
vars
,
"
EXIT_ON_ERROR
"
);
die_on_error
=
GetVariableBool
(
pset
.
vars
,
"
ON_ERROR_STOP
"
);
/*
* query_buf holds query already accumulated. line is the
...
...
src/bin/scripts/createdb
浏览文件 @
2fb0ff0c
...
...
@@ -11,7 +11,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createdb,v 1.
7 2000/01/19 20:08:35
petere Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createdb,v 1.
8 2000/02/10 20:08:58
petere Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -126,7 +126,7 @@ fi
if
[
-n
"
$MB
"
]
then
mbcode
=
`
pg_encoding
"
$MB
"
`
mbcode
=
`
${
PATHNAME
}
pg_encoding
"
$MB
"
`
if
[
-z
"
$mbcode
"
]
then
echo
"
$CMDNAME
:
\"
$MB
\"
is not a valid encoding name"
...
...
@@ -135,9 +135,12 @@ then
fi
if
[
-z
"
$dbname
"
]
;
then
echo
"
$CMDNAME
: missing required argument database name"
echo
"Try -? for help."
exit
1
if
[
"
$PGUSER
"
]
;
then
dbname
=
$PGUSER
else
dbname
=
`
${
PATHNAME
}
pg_id
-u
-n
`
fi
[
$?
-ne
0
]
&&
exit
1
fi
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录