Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
a8da71e0
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,发现更多精彩内容 >>
提交
a8da71e0
编写于
10月 04, 2005
作者:
P
Peter Eisentraut
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Clean up some messages and fix missing translation support. Option --log
renamed to --log-file for clarity.
上级
380ab366
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
33 addition
and
30 deletion
+33
-30
doc/src/sgml/ref/psql-ref.sgml
doc/src/sgml/ref/psql-ref.sgml
+3
-3
src/bin/psql/common.c
src/bin/psql/common.c
+13
-11
src/bin/psql/describe.c
src/bin/psql/describe.c
+6
-6
src/bin/psql/print.c
src/bin/psql/print.c
+2
-2
src/bin/psql/startup.c
src/bin/psql/startup.c
+9
-8
未找到文件。
doc/src/sgml/ref/psql-ref.sgml
浏览文件 @
a8da71e0
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.1
49 2005/08/14 18:49:29 tgl
Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.1
50 2005/10/04 19:01:14 petere
Exp $
PostgreSQL documentation
-->
...
...
@@ -224,10 +224,10 @@ PostgreSQL documentation
<varlistentry>
<term><option>-L <replaceable class="parameter">filename</replaceable></></term>
<term><option>--log <replaceable class="parameter">filename</replaceable></></term>
<term><option>--log
-file
<replaceable class="parameter">filename</replaceable></></term>
<listitem>
<para>
Log
all query output into file <replaceable
Write
all query output into file <replaceable
class="parameter">filename</replaceable> in addition to the regular output source.
</para>
</listitem>
...
...
src/bin/psql/common.c
浏览文件 @
a8da71e0
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/common.c,v 1.10
5 2005/09/20 21:43:08 momjian
Exp $
* $PostgreSQL: pgsql/src/bin/psql/common.c,v 1.10
6 2005/10/04 19:01:18 petere
Exp $
*/
#include "postgres_fe.h"
#include "common.h"
...
...
@@ -74,7 +74,7 @@ pg_strdup(const char *string)
if
(
!
string
)
{
fprintf
(
stderr
,
_
(
"%s:
x
strdup: cannot duplicate null pointer (internal error)
\n
"
),
fprintf
(
stderr
,
_
(
"%s:
pg_
strdup: cannot duplicate null pointer (internal error)
\n
"
),
pset
.
progname
);
exit
(
EXIT_FAILURE
);
}
...
...
@@ -719,15 +719,16 @@ PSQLexec(const char *query, bool start_xact)
echo_hidden
=
SwitchVariable
(
pset
.
vars
,
"ECHO_HIDDEN"
,
"noexec"
,
NULL
);
if
(
echo_hidden
!=
VAR_NOTSET
)
{
printf
(
"********* QUERY **********
\n
"
"%s
\n
"
"**************************
\n\n
"
,
query
);
printf
(
_
(
"********* QUERY **********
\n
"
"%s
\n
"
"**************************
\n\n
"
)
,
query
);
fflush
(
stdout
);
if
(
pset
.
logfile
)
{
fprintf
(
pset
.
logfile
,
"********* QUERY **********
\n
"
"%s
\n
"
"**************************
\n\n
"
,
query
);
fprintf
(
pset
.
logfile
,
_
(
"********* QUERY **********
\n
"
"%s
\n
"
"**************************
\n\n
"
),
query
);
fflush
(
pset
.
logfile
);
}
...
...
@@ -987,9 +988,10 @@ SendQuery(const char *query)
if
(
pset
.
logfile
)
{
fprintf
(
pset
.
logfile
,
"********* QUERY **********
\n
"
"%s
\n
"
"**************************
\n\n
"
,
query
);
fprintf
(
pset
.
logfile
,
_
(
"********* QUERY **********
\n
"
"%s
\n
"
"**************************
\n\n
"
),
query
);
fflush
(
pset
.
logfile
);
}
...
...
src/bin/psql/describe.c
浏览文件 @
a8da71e0
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.12
5 2005/10/02 23:50:10 tgl
Exp $
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.12
6 2005/10/04 19:01:18 petere
Exp $
*/
#include "postgres_fe.h"
#include "describe.h"
...
...
@@ -1176,13 +1176,13 @@ describeOneTableDetails(const char *schemaname,
{
appendPQExpBuffer
(
&
buf
,
", "
);
appendPQExpBuffer
(
&
buf
,
tmpbuf
.
data
);
count_footers
-=
2
;
}
else
count_footers
-=
1
;
termPQExpBuffer
(
&
tmpbuf
);
footers
[
count_footers
++
]
=
pg_strdup
(
buf
.
data
);
}
}
...
...
@@ -1365,15 +1365,15 @@ add_tablespace_footer(char relkind, Oid tablespace, char **footers,
printfPQExpBuffer
(
&
buf
,
newline
?
_
(
"Tablespace:
\"
%s
\"
"
)
:
_
(
"tablespace
\"
%s
\"
"
),
PQgetvalue
(
result1
,
0
,
0
));
footers
[(
*
count
)
++
]
=
pg_strdup
(
buf
.
data
);
}
PQclear
(
result1
);
return
true
;
}
}
return
false
;
}
...
...
src/bin/psql/print.c
浏览文件 @
a8da71e0
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.7
6 2005/09/27 16:30:25 momjian
Exp $
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.7
7 2005/10/04 19:01:18 petere
Exp $
*/
#include "postgres_fe.h"
#include "common.h"
...
...
@@ -1579,7 +1579,7 @@ printTable(const char *title,
border
,
output
);
break
;
default:
fprintf
(
stderr
,
_
(
"i
llegal output format
: %d"
),
opt
->
format
);
fprintf
(
stderr
,
_
(
"i
nvalid output format (internal error)
: %d"
),
opt
->
format
);
exit
(
EXIT_FAILURE
);
}
...
...
src/bin/psql/startup.c
浏览文件 @
a8da71e0
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.12
3 2005/09/20 18:59:02 momjian
Exp $
* $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.12
4 2005/10/04 19:01:18 petere
Exp $
*/
#include "postgres_fe.h"
...
...
@@ -191,14 +191,14 @@ main(int argc, char *argv[])
}
if
(
options
.
username
==
NULL
)
password_prompt
=
strdup
(
"Password: "
);
password_prompt
=
pg_strdup
(
_
(
"Password: "
)
);
else
{
password_prompt
=
malloc
(
strlen
(
"Password for user %s: "
)
-
2
+
password_prompt
=
malloc
(
strlen
(
_
(
"Password for user %s: "
)
)
-
2
+
strlen
(
options
.
username
)
+
1
);
sprintf
(
password_prompt
,
"Password for user %s: "
,
options
.
username
);
sprintf
(
password_prompt
,
_
(
"Password for user %s: "
)
,
options
.
username
);
}
if
(
pset
.
getPassword
)
password
=
simple_prompt
(
password_prompt
,
100
,
false
);
...
...
@@ -252,7 +252,8 @@ main(int argc, char *argv[])
{
pset
.
logfile
=
fopen
(
options
.
logfilename
,
"a"
);
if
(
!
pset
.
logfile
)
fprintf
(
stderr
,
gettext
(
"logfile open failed for %s
\n\n
"
),
options
.
logfilename
);
fprintf
(
stderr
,
_
(
"%s: could not open log file
\"
%s
\"
: %s
\n
"
),
pset
.
progname
,
options
.
logfilename
,
strerror
(
errno
));
}
/*
...
...
@@ -422,7 +423,7 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
{
"host"
,
required_argument
,
NULL
,
'h'
},
{
"html"
,
no_argument
,
NULL
,
'H'
},
{
"list"
,
no_argument
,
NULL
,
'l'
},
{
"log"
,
required_argument
,
NULL
,
'L'
},
{
"log
-file
"
,
required_argument
,
NULL
,
'L'
},
{
"no-readline"
,
no_argument
,
NULL
,
'n'
},
{
"output"
,
required_argument
,
NULL
,
'o'
},
{
"port"
,
required_argument
,
NULL
,
'p'
},
...
...
@@ -528,7 +529,7 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
if
(
!
result
)
{
fprintf
(
stderr
,
_
(
"%s: could
n'
t set printing parameter
\"
%s
\"\n
"
),
pset
.
progname
,
value
);
fprintf
(
stderr
,
_
(
"%s: could
no
t set printing parameter
\"
%s
\"\n
"
),
pset
.
progname
,
value
);
exit
(
EXIT_FAILURE
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录