Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
50746552
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,发现更多精彩内容 >>
提交
50746552
编写于
7月 18, 2005
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
\pset numericsep -> numericlocale.
上级
71d0cabe
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
79 addition
and
78 deletion
+79
-78
doc/src/sgml/ref/psql-ref.sgml
doc/src/sgml/ref/psql-ref.sgml
+2
-2
src/bin/psql/command.c
src/bin/psql/command.c
+7
-7
src/bin/psql/help.c
src/bin/psql/help.c
+2
-2
src/bin/psql/print.c
src/bin/psql/print.c
+66
-65
src/bin/psql/print.h
src/bin/psql/print.h
+2
-2
未找到文件。
doc/src/sgml/ref/psql-ref.sgml
浏览文件 @
50746552
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.14
7 2005/07/14 08:42:36
momjian Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.14
8 2005/07/18 20:57:52
momjian Exp $
PostgreSQL documentation
-->
...
...
@@ -1493,7 +1493,7 @@ lo_import 152801
</varlistentry>
<varlistentry>
<term><literal>numeric
sep
</literal></term>
<term><literal>numeric
locale
</literal></term>
<listitem>
<para>
Toggles the display of a locale-aware character to separate groups
...
...
src/bin/psql/command.c
浏览文件 @
50746552
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.1
49 2005/07/14 08:42:37
momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.1
50 2005/07/18 20:57:53
momjian Exp $
*/
#include "postgres_fe.h"
#include "command.h"
...
...
@@ -1420,16 +1420,16 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
:
_
(
"Expanded display is off.
\n
"
));
}
/*
numeric separators
*/
else
if
(
strcmp
(
param
,
"numeric
sep
"
)
==
0
)
/*
locale-aware numeric output
*/
else
if
(
strcmp
(
param
,
"numeric
locale
"
)
==
0
)
{
popt
->
topt
.
numeric
Sep
=
!
popt
->
topt
.
numericSep
;
popt
->
topt
.
numeric
Locale
=
!
popt
->
topt
.
numericLocale
;
if
(
!
quiet
)
{
if
(
popt
->
topt
.
numeric
Sep
)
puts
(
_
(
"Showing
numeric separators
."
));
if
(
popt
->
topt
.
numeric
Locale
)
puts
(
_
(
"Showing
locale-adjusted numeric output
."
));
else
puts
(
_
(
"
Numeric separators are
off."
));
puts
(
_
(
"
Locale-adjusted numeric output is
off."
));
}
}
...
...
src/bin/psql/help.c
浏览文件 @
50746552
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.10
4 2005/07/10 03:46:1
3 momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.10
5 2005/07/18 20:57:5
3 momjian Exp $
*/
#include "postgres_fe.h"
#include "common.h"
...
...
@@ -239,7 +239,7 @@ slashUsage(unsigned short int pager)
fprintf
(
output
,
_
(
"
\\
pset NAME [VALUE]
\n
"
" set table output option
\n
"
" (NAME := {format|border|expanded|fieldsep|footer|null|
\n
"
" numeric
sep
|recordsep|tuples_only|title|tableattr|pager})
\n
"
));
" numeric
locale
|recordsep|tuples_only|title|tableattr|pager})
\n
"
));
fprintf
(
output
,
_
(
"
\\
t show only rows (currently %s)
\n
"
),
ON
(
pset
.
popt
.
topt
.
tuples_only
));
fprintf
(
output
,
_
(
"
\\
T [STRING] set HTML <table> tag attributes, or unset if none
\n
"
));
...
...
src/bin/psql/print.c
浏览文件 @
50746552
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.7
1 2005/07/18 19:27:37
momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.7
2 2005/07/18 20:57:53
momjian Exp $
*/
#include "postgres_fe.h"
#include "common.h"
...
...
@@ -62,8 +62,9 @@ integer_digits(const char *my_str)
return
strlen
(
my_str
)
-
frac_len
;
}
/* Return additional length required for locale-aware numeric output */
static
int
len_numericseps
(
const
char
*
my_str
)
additional_numeric_locale_len
(
const
char
*
my_str
)
{
int
int_len
=
integer_digits
(
my_str
),
len
=
0
;
int
groupdigits
=
atoi
(
grouping
);
...
...
@@ -80,13 +81,13 @@ len_numericseps(const char *my_str)
}
static
int
len_with_numericsep
(
const
char
*
my_str
)
strlen_with_numeric_locale
(
const
char
*
my_str
)
{
return
strlen
(
my_str
)
+
len_numericseps
(
my_str
);
return
strlen
(
my_str
)
+
additional_numeric_locale_len
(
my_str
);
}
static
void
format_numeric
sep
(
char
*
my_str
)
format_numeric
_locale
(
char
*
my_str
)
{
int
i
,
j
,
int_len
=
integer_digits
(
my_str
),
leading_digits
;
int
groupdigits
=
atoi
(
grouping
);
...
...
@@ -95,7 +96,7 @@ format_numericsep(char *my_str)
if
(
my_str
[
0
]
==
'-'
)
my_str
++
;
new_str
=
pg_local_malloc
(
len_with_numericsep
(
my_str
)
+
1
);
new_str
=
pg_local_malloc
(
strlen_with_numeric_locale
(
my_str
)
+
1
);
leading_digits
=
(
int_len
%
groupdigits
!=
0
)
?
int_len
%
groupdigits
:
groupdigits
;
...
...
@@ -143,7 +144,7 @@ print_unaligned_text(const char *title, const char *const *headers,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
opt_align
,
const
char
*
opt_fieldsep
,
const
char
*
opt_recordsep
,
bool
opt_tuples_only
,
bool
opt_numeric
sep
,
FILE
*
fout
)
bool
opt_numeric
_locale
,
FILE
*
fout
)
{
unsigned
int
col_count
=
0
;
unsigned
int
i
;
...
...
@@ -182,12 +183,12 @@ print_unaligned_text(const char *title, const char *const *headers,
fputs
(
opt_recordsep
,
fout
);
need_recordsep
=
false
;
}
if
(
opt_align
[
i
%
col_count
]
==
'r'
&&
opt_numeric
sep
)
if
(
opt_align
[
i
%
col_count
]
==
'r'
&&
opt_numeric
_locale
)
{
char
*
my_cell
=
pg_local_malloc
(
len_with_numericsep
(
*
ptr
)
+
1
);
char
*
my_cell
=
pg_local_malloc
(
strlen_with_numeric_locale
(
*
ptr
)
+
1
);
strcpy
(
my_cell
,
*
ptr
);
format_numeric
sep
(
my_cell
);
format_numeric
_locale
(
my_cell
);
fputs
(
my_cell
,
fout
);
free
(
my_cell
);
}
...
...
@@ -227,7 +228,7 @@ print_unaligned_vertical(const char *title, const char *const *headers,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
opt_align
,
const
char
*
opt_fieldsep
,
const
char
*
opt_recordsep
,
bool
opt_tuples_only
,
bool
opt_numeric
sep
,
FILE
*
fout
)
bool
opt_tuples_only
,
bool
opt_numeric
_locale
,
FILE
*
fout
)
{
unsigned
int
col_count
=
0
;
unsigned
int
i
;
...
...
@@ -258,12 +259,12 @@ print_unaligned_vertical(const char *title, const char *const *headers,
fputs
(
headers
[
i
%
col_count
],
fout
);
fputs
(
opt_fieldsep
,
fout
);
if
(
opt_align
[
i
%
col_count
]
==
'r'
&&
opt_numeric
sep
)
if
(
opt_align
[
i
%
col_count
]
==
'r'
&&
opt_numeric
_locale
)
{
char
*
my_cell
=
pg_local_malloc
(
len_with_numericsep
(
*
ptr
)
+
1
);
char
*
my_cell
=
pg_local_malloc
(
strlen_with_numeric_locale
(
*
ptr
)
+
1
);
strcpy
(
my_cell
,
*
ptr
);
format_numeric
sep
(
my_cell
);
format_numeric
_locale
(
my_cell
);
fputs
(
my_cell
,
fout
);
free
(
my_cell
);
}
...
...
@@ -331,7 +332,7 @@ _print_horizontal_line(const unsigned int col_count, const unsigned int *widths,
static
void
print_aligned_text
(
const
char
*
title
,
const
char
*
const
*
headers
,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
opt_align
,
bool
opt_tuples_only
,
bool
opt_numeric
sep
,
const
char
*
opt_align
,
bool
opt_tuples_only
,
bool
opt_numeric
_locale
,
unsigned
short
int
opt_border
,
int
encoding
,
FILE
*
fout
)
{
...
...
@@ -398,14 +399,14 @@ print_aligned_text(const char *title, const char *const *headers,
for
(
i
=
0
,
ptr
=
cells
;
*
ptr
;
ptr
++
,
i
++
)
{
int
numeric
seps
;
int
numeric
_locale_len
;
if
(
opt_align
[
i
%
col_count
]
==
'r'
&&
opt_numeric
sep
)
numeric
seps
=
len_numericseps
(
*
ptr
);
if
(
opt_align
[
i
%
col_count
]
==
'r'
&&
opt_numeric
_locale
)
numeric
_locale_len
=
additional_numeric_locale_len
(
*
ptr
);
else
numeric
seps
=
0
;
numeric
_locale_len
=
0
;
tmp
=
pg_wcswidth
((
unsigned
char
*
)
*
ptr
,
strlen
(
*
ptr
),
encoding
)
+
numeric
seps
;
tmp
=
pg_wcswidth
((
unsigned
char
*
)
*
ptr
,
strlen
(
*
ptr
),
encoding
)
+
numeric
_locale_len
;
if
(
tmp
>
widths
[
i
%
col_count
])
widths
[
i
%
col_count
]
=
tmp
;
cell_w
[
i
]
=
tmp
;
...
...
@@ -485,12 +486,12 @@ print_aligned_text(const char *title, const char *const *headers,
/* content */
if
(
opt_align
[
i
%
col_count
]
==
'r'
)
{
if
(
opt_numeric
sep
)
if
(
opt_numeric
_locale
)
{
char
*
my_cell
=
pg_local_malloc
(
cell_w
[
i
]
+
1
);
strcpy
(
my_cell
,
*
ptr
);
format_numeric
sep
(
my_cell
);
format_numeric
_locale
(
my_cell
);
fprintf
(
fout
,
"%*s%s"
,
widths
[
i
%
col_count
]
-
cell_w
[
i
],
""
,
my_cell
);
free
(
my_cell
);
}
...
...
@@ -552,7 +553,7 @@ static void
print_aligned_vertical
(
const
char
*
title
,
const
char
*
const
*
headers
,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
opt_align
,
bool
opt_tuples_only
,
bool
opt_numeric
sep
,
unsigned
short
int
opt_border
,
bool
opt_numeric
_locale
,
unsigned
short
int
opt_border
,
int
encoding
,
FILE
*
fout
)
{
unsigned
int
col_count
=
0
;
...
...
@@ -615,14 +616,14 @@ print_aligned_vertical(const char *title, const char *const *headers,
/* find longest data cell */
for
(
i
=
0
,
ptr
=
cells
;
*
ptr
;
ptr
++
,
i
++
)
{
int
numeric
seps
;
int
numeric
_locale_len
;
if
(
opt_align
[
i
%
col_count
]
==
'r'
&&
opt_numeric
sep
)
numeric
seps
=
len_numericseps
(
*
ptr
);
if
(
opt_align
[
i
%
col_count
]
==
'r'
&&
opt_numeric
_locale
)
numeric
_locale_len
=
additional_numeric_locale_len
(
*
ptr
);
else
numeric
seps
=
0
;
numeric
_locale_len
=
0
;
tmp
=
pg_wcswidth
((
unsigned
char
*
)
*
ptr
,
strlen
(
*
ptr
),
encoding
)
+
numeric
seps
;
tmp
=
pg_wcswidth
((
unsigned
char
*
)
*
ptr
,
strlen
(
*
ptr
),
encoding
)
+
numeric
_locale_len
;
if
(
tmp
>
dwidth
)
dwidth
=
tmp
;
cell_w
[
i
]
=
tmp
;
...
...
@@ -700,8 +701,8 @@ print_aligned_vertical(const char *title, const char *const *headers,
char
*
my_cell
=
pg_local_malloc
(
cell_w
[
i
]
+
1
);
strcpy
(
my_cell
,
*
ptr
);
if
(
opt_align
[
i
%
col_count
]
==
'r'
&&
opt_numeric
sep
)
format_numeric
sep
(
my_cell
);
if
(
opt_align
[
i
%
col_count
]
==
'r'
&&
opt_numeric
_locale
)
format_numeric
_locale
(
my_cell
);
if
(
opt_border
<
2
)
puts
(
my_cell
);
else
...
...
@@ -788,7 +789,7 @@ static void
print_html_text
(
const
char
*
title
,
const
char
*
const
*
headers
,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
opt_align
,
bool
opt_tuples_only
,
bool
opt_numeric
sep
,
unsigned
short
int
opt_border
,
bool
opt_numeric
_locale
,
unsigned
short
int
opt_border
,
const
char
*
opt_table_attr
,
FILE
*
fout
)
{
unsigned
int
col_count
=
0
;
...
...
@@ -834,12 +835,12 @@ print_html_text(const char *title, const char *const *headers,
/* is string only whitespace? */
if
((
*
ptr
)[
strspn
(
*
ptr
,
"
\t
"
)]
==
'\0'
)
fputs
(
" "
,
fout
);
else
if
(
opt_align
[
i
%
col_count
]
==
'r'
&&
opt_numeric
sep
)
else
if
(
opt_align
[
i
%
col_count
]
==
'r'
&&
opt_numeric
_locale
)
{
char
*
my_cell
=
pg_local_malloc
(
len_with_numericsep
(
*
ptr
)
+
1
);
char
*
my_cell
=
pg_local_malloc
(
strlen_with_numeric_locale
(
*
ptr
)
+
1
);
strcpy
(
my_cell
,
*
ptr
);
format_numeric
sep
(
my_cell
);
format_numeric
_locale
(
my_cell
);
html_escaped_print
(
my_cell
,
fout
);
free
(
my_cell
);
}
...
...
@@ -875,7 +876,7 @@ static void
print_html_vertical
(
const
char
*
title
,
const
char
*
const
*
headers
,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
opt_align
,
bool
opt_tuples_only
,
bool
opt_numeric
sep
,
unsigned
short
int
opt_border
,
bool
opt_numeric
_locale
,
unsigned
short
int
opt_border
,
const
char
*
opt_table_attr
,
FILE
*
fout
)
{
unsigned
int
col_count
=
0
;
...
...
@@ -919,12 +920,12 @@ print_html_vertical(const char *title, const char *const *headers,
/* is string only whitespace? */
if
((
*
ptr
)[
strspn
(
*
ptr
,
"
\t
"
)]
==
'\0'
)
fputs
(
" "
,
fout
);
else
if
(
opt_align
[
i
%
col_count
]
==
'r'
&&
opt_numeric
sep
)
else
if
(
opt_align
[
i
%
col_count
]
==
'r'
&&
opt_numeric
_locale
)
{
char
*
my_cell
=
pg_local_malloc
(
len_with_numericsep
(
*
ptr
)
+
1
);
char
*
my_cell
=
pg_local_malloc
(
strlen_with_numeric_locale
(
*
ptr
)
+
1
);
strcpy
(
my_cell
,
*
ptr
);
format_numeric
sep
(
my_cell
);
format_numeric
_locale
(
my_cell
);
html_escaped_print
(
my_cell
,
fout
);
free
(
my_cell
);
}
...
...
@@ -1000,7 +1001,7 @@ static void
print_latex_text
(
const
char
*
title
,
const
char
*
const
*
headers
,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
opt_align
,
bool
opt_tuples_only
,
bool
opt_numeric
sep
,
unsigned
short
int
opt_border
,
bool
opt_numeric
_locale
,
unsigned
short
int
opt_border
,
FILE
*
fout
)
{
unsigned
int
col_count
=
0
;
...
...
@@ -1061,12 +1062,12 @@ print_latex_text(const char *title, const char *const *headers,
/* print cells */
for
(
i
=
0
,
ptr
=
cells
;
*
ptr
;
i
++
,
ptr
++
)
{
if
(
opt_numeric
sep
)
if
(
opt_numeric
_locale
)
{
char
*
my_cell
=
pg_local_malloc
(
len_with_numericsep
(
*
ptr
)
+
1
);
char
*
my_cell
=
pg_local_malloc
(
strlen_with_numeric_locale
(
*
ptr
)
+
1
);
strcpy
(
my_cell
,
*
ptr
);
format_numeric
sep
(
my_cell
);
format_numeric
_locale
(
my_cell
);
latex_escaped_print
(
my_cell
,
fout
);
free
(
my_cell
);
}
...
...
@@ -1103,7 +1104,7 @@ static void
print_latex_vertical
(
const
char
*
title
,
const
char
*
const
*
headers
,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
opt_align
,
bool
opt_tuples_only
,
bool
opt_numeric
sep
,
unsigned
short
int
opt_border
,
bool
opt_numeric
_locale
,
unsigned
short
int
opt_border
,
FILE
*
fout
)
{
unsigned
int
col_count
=
0
;
...
...
@@ -1174,12 +1175,12 @@ print_latex_vertical(const char *title, const char *const *headers,
if
(
footers
&&
!
opt_tuples_only
)
for
(
ptr
=
footers
;
*
ptr
;
ptr
++
)
{
if
(
opt_numeric
sep
)
if
(
opt_numeric
_locale
)
{
char
*
my_cell
=
pg_local_malloc
(
len_with_numericsep
(
*
ptr
)
+
1
);
char
*
my_cell
=
pg_local_malloc
(
strlen_with_numeric_locale
(
*
ptr
)
+
1
);
strcpy
(
my_cell
,
*
ptr
);
format_numeric
sep
(
my_cell
);
format_numeric
_locale
(
my_cell
);
latex_escaped_print
(
my_cell
,
fout
);
free
(
my_cell
);
}
...
...
@@ -1220,7 +1221,7 @@ static void
print_troff_ms_text
(
const
char
*
title
,
const
char
*
const
*
headers
,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
opt_align
,
bool
opt_tuples_only
,
bool
opt_numeric
sep
,
unsigned
short
int
opt_border
,
bool
opt_numeric
_locale
,
unsigned
short
int
opt_border
,
FILE
*
fout
)
{
unsigned
int
col_count
=
0
;
...
...
@@ -1274,12 +1275,12 @@ print_troff_ms_text(const char *title, const char *const *headers,
/* print cells */
for
(
i
=
0
,
ptr
=
cells
;
*
ptr
;
i
++
,
ptr
++
)
{
if
(
opt_numeric
sep
)
if
(
opt_numeric
_locale
)
{
char
*
my_cell
=
pg_local_malloc
(
len_with_numericsep
(
*
ptr
)
+
1
);
char
*
my_cell
=
pg_local_malloc
(
strlen_with_numeric_locale
(
*
ptr
)
+
1
);
strcpy
(
my_cell
,
*
ptr
);
format_numeric
sep
(
my_cell
);
format_numeric
_locale
(
my_cell
);
troff_ms_escaped_print
(
my_cell
,
fout
);
free
(
my_cell
);
}
...
...
@@ -1313,7 +1314,7 @@ static void
print_troff_ms_vertical
(
const
char
*
title
,
const
char
*
const
*
headers
,
const
char
*
const
*
cells
,
const
char
*
const
*
footers
,
const
char
*
opt_align
,
bool
opt_tuples_only
,
bool
opt_numeric
sep
,
unsigned
short
int
opt_border
,
bool
opt_numeric
_locale
,
unsigned
short
int
opt_border
,
FILE
*
fout
)
{
unsigned
int
col_count
=
0
;
...
...
@@ -1386,12 +1387,12 @@ print_troff_ms_vertical(const char *title, const char *const *headers,
troff_ms_escaped_print
(
headers
[
i
%
col_count
],
fout
);
fputc
(
'\t'
,
fout
);
if
(
opt_numeric
sep
)
if
(
opt_numeric
_locale
)
{
char
*
my_cell
=
pg_local_malloc
(
len_with_numericsep
(
*
ptr
)
+
1
);
char
*
my_cell
=
pg_local_malloc
(
strlen_with_numeric_locale
(
*
ptr
)
+
1
);
strcpy
(
my_cell
,
*
ptr
);
format_numeric
sep
(
my_cell
);
format_numeric
_locale
(
my_cell
);
troff_ms_escaped_print
(
my_cell
,
fout
);
free
(
my_cell
);
}
...
...
@@ -1533,7 +1534,7 @@ printTable(const char *title,
/* print the stuff */
if
(
flog
)
print_aligned_text
(
title
,
headers
,
cells
,
footers
,
align
,
opt
->
tuples_only
,
opt
->
numeric
Sep
,
border
,
opt
->
encoding
,
flog
);
print_aligned_text
(
title
,
headers
,
cells
,
footers
,
align
,
opt
->
tuples_only
,
opt
->
numeric
Locale
,
border
,
opt
->
encoding
,
flog
);
switch
(
opt
->
format
)
{
...
...
@@ -1541,50 +1542,50 @@ printTable(const char *title,
if
(
use_expanded
)
print_unaligned_vertical
(
title
,
headers
,
cells
,
footers
,
align
,
opt
->
fieldSep
,
opt
->
recordSep
,
opt
->
tuples_only
,
opt
->
numeric
Sep
,
output
);
opt
->
tuples_only
,
opt
->
numeric
Locale
,
output
);
else
print_unaligned_text
(
title
,
headers
,
cells
,
footers
,
align
,
opt
->
fieldSep
,
opt
->
recordSep
,
opt
->
tuples_only
,
opt
->
numeric
Sep
,
output
);
opt
->
tuples_only
,
opt
->
numeric
Locale
,
output
);
break
;
case
PRINT_ALIGNED
:
if
(
use_expanded
)
print_aligned_vertical
(
title
,
headers
,
cells
,
footers
,
align
,
opt
->
tuples_only
,
opt
->
numeric
Sep
,
border
,
opt
->
tuples_only
,
opt
->
numeric
Locale
,
border
,
opt
->
encoding
,
output
);
else
print_aligned_text
(
title
,
headers
,
cells
,
footers
,
align
,
opt
->
tuples_only
,
opt
->
numeric
Sep
,
opt
->
tuples_only
,
opt
->
numeric
Locale
,
border
,
opt
->
encoding
,
output
);
break
;
case
PRINT_HTML
:
if
(
use_expanded
)
print_html_vertical
(
title
,
headers
,
cells
,
footers
,
align
,
opt
->
tuples_only
,
opt
->
numeric
Sep
,
opt
->
tuples_only
,
opt
->
numeric
Locale
,
border
,
opt
->
tableAttr
,
output
);
else
print_html_text
(
title
,
headers
,
cells
,
footers
,
align
,
opt
->
tuples_only
,
opt
->
numeric
Sep
,
border
,
align
,
opt
->
tuples_only
,
opt
->
numeric
Locale
,
border
,
opt
->
tableAttr
,
output
);
break
;
case
PRINT_LATEX
:
if
(
use_expanded
)
print_latex_vertical
(
title
,
headers
,
cells
,
footers
,
align
,
opt
->
tuples_only
,
opt
->
numeric
Sep
,
opt
->
tuples_only
,
opt
->
numeric
Locale
,
border
,
output
);
else
print_latex_text
(
title
,
headers
,
cells
,
footers
,
align
,
opt
->
tuples_only
,
opt
->
numeric
Sep
,
opt
->
tuples_only
,
opt
->
numeric
Locale
,
border
,
output
);
break
;
case
PRINT_TROFF_MS
:
if
(
use_expanded
)
print_troff_ms_vertical
(
title
,
headers
,
cells
,
footers
,
align
,
opt
->
tuples_only
,
opt
->
numeric
Sep
,
opt
->
tuples_only
,
opt
->
numeric
Locale
,
border
,
output
);
else
print_troff_ms_text
(
title
,
headers
,
cells
,
footers
,
align
,
opt
->
tuples_only
,
opt
->
numeric
Sep
,
opt
->
tuples_only
,
opt
->
numeric
Locale
,
border
,
output
);
break
;
default:
...
...
src/bin/psql/print.h
浏览文件 @
50746552
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/print.h,v 1.2
7 2005/07/14 08:42:37
momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/print.h,v 1.2
8 2005/07/18 20:57:53
momjian Exp $
*/
#ifndef PRINT_H
#define PRINT_H
...
...
@@ -40,7 +40,7 @@ typedef struct _printTableOpt
char
*
fieldSep
;
/* field separator for unaligned text mode */
char
*
recordSep
;
/* record separator for unaligned text
* mode */
bool
numeric
Sep
;
/* locale-aware numeric units separator and
bool
numeric
Locale
;
/* locale-aware numeric units separator and
* decimal marker */
char
*
tableAttr
;
/* attributes for HTML <table ...> */
int
encoding
;
/* character encoding */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录