Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
7ef56347
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,发现更多精彩内容 >>
提交
7ef56347
编写于
8月 04, 2002
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Here is a doc patch for the SHOW X changes and new config-settings
functions. If there are no objections, please apply. Joe Conway
上级
22c64f18
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
166 addition
and
5 deletion
+166
-5
doc/src/sgml/func.sgml
doc/src/sgml/func.sgml
+116
-1
doc/src/sgml/ref/set.sgml
doc/src/sgml/ref/set.sgml
+11
-1
doc/src/sgml/ref/show.sgml
doc/src/sgml/ref/show.sgml
+39
-3
未找到文件。
doc/src/sgml/func.sgml
浏览文件 @
7ef56347
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.10
5 2002/07/31 02:27:28
momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.10
6 2002/08/04 03:53:10
momjian Exp $
PostgreSQL documentation
-->
...
...
@@ -4441,6 +4441,121 @@ SELECT NULLIF(value, '(none)') ...
server's version.
</para>
<table>
<title>Configuration Settings Information Functions</title>
<tgroup cols="3">
<thead>
<row><entry>Name</entry> <entry>Return Type</entry> <entry>Description</entry></row>
</thead>
<tbody>
<row>
<entry>
<function>current_setting</function>(<parameter>setting_name</parameter>)
</entry>
<entry><type>text</type></entry>
<entry>value of current setting</entry>
</row>
<row>
<entry>
<function>set_config(<parameter>setting_name</parameter>,
<parameter>new_value</parameter>,
<parameter>is_local</parameter>)</function>
</entry>
<entry><type>text</type></entry>
<entry>new value of current setting</entry>
</row>
</tbody>
</tgroup>
</table>
<indexterm zone="functions-misc">
<primary>setting</primary>
<secondary>current</secondary>
</indexterm>
<indexterm zone="functions-misc">
<primary>setting</primary>
<secondary>set</secondary>
</indexterm>
<para>
The <function>current_setting</function> is used to obtain the current
value of the <parameter>setting_name</parameter> setting, as a query
result. It is the equivalent to the SQL <command>SHOW</command> command.
For example:
<programlisting>
select current_setting('DateStyle');
current_setting
---------------------------------------
ISO with US (NonEuropean) conventions
(1 row)
</programlisting>
</para>
<para>
<function>set_config</function> allows the <parameter>setting_name
</parameter> setting to be changed to <parameter>new_value</parameter>.
If <parameter>is_local</parameter> is set to <literal>true</literal>,
the new value will only apply to the current transaction. If you want
the new value to apply for the current session, use
<literal>false</literal> instead. It is the equivalent to the SQL
<command>SET</command> command. For example:
<programlisting>
SHOW show_query_stats;
show_query_stats
------------------
on
(1 row)
select set_config('show_query_stats','off','f');
set_config
------------
off
(1 row)
SHOW show_query_stats;
show_query_stats
------------------
off
(1 row)
select set_config('show_query_stats','on','t');
set_config
------------
on
(1 row)
SHOW show_query_stats;
show_query_stats
------------------
off
(1 row)
BEGIN;
BEGIN
select set_config('show_query_stats','on','t');
set_config
------------
on
(1 row)
SHOW show_query_stats;
show_query_stats
------------------
on
(1 row)
COMMIT;
COMMIT
SHOW show_query_stats;
show_query_stats
------------------
off
(1 row)
</programlisting>
</para>
<table>
<title>Access Privilege Inquiry Functions</title>
<tgroup cols="3">
...
...
doc/src/sgml/ref/set.sgml
浏览文件 @
7ef56347
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/set.sgml,v 1.6
2 2002/06/11 15:41:30 thomas
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/set.sgml,v 1.6
3 2002/08/04 03:53:11 momjian
Exp $
PostgreSQL documentation
-->
...
...
@@ -495,6 +495,16 @@ SELECT CURRENT_TIMESTAMP AS today;
</para>
</refsect2>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
The function <function>set_config</function> provides the equivalent
capability. See <citetitle>Miscellaneous Functions</citetitle> in the
<citetitle>PostgreSQL User's Guide</citetitle>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
...
...
doc/src/sgml/ref/show.sgml
浏览文件 @
7ef56347
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/show.sgml,v 1.1
7 2002/05/17 01:19:16 tgl
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/show.sgml,v 1.1
8 2002/08/04 03:53:11 momjian
Exp $
PostgreSQL documentation
-->
...
...
@@ -83,7 +83,10 @@ SHOW ALL
<screen>
SHOW DateStyle;
INFO: DateStyle is ISO with US (NonEuropean) conventions
DateStyle
---------------------------------------
ISO with US (NonEuropean) conventions
(1 row)
</screen>
</para>
...
...
@@ -91,9 +94,32 @@ INFO: DateStyle is ISO with US (NonEuropean) conventions
Show the current genetic optimizer (<literal>geqo</literal>) setting:
<screen>
SHOW GEQO;
INFO: geqo is on
geqo
------
on
(1 row)
</screen>
</para>
<para>
Show all settings:
<screen>
SHOW ALL;
name | setting
-------------------------------+---------------------------------------
australian_timezones | off
authentication_timeout | 60
checkpoint_segments | 3
.
.
.
wal_debug | 0
wal_files | 0
wal_sync_method | fdatasync
(94 rows)
</screen>
</para>
</refsect1>
<refsect1 id="R1-SQL-SHOW-3">
...
...
@@ -104,6 +130,16 @@ INFO: geqo is on
<productname>PostgreSQL</productname> extension.
</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
The function <function>current_setting</function> produces equivalent
output. See <citetitle>Miscellaneous Functions</citetitle> in the
<citetitle>PostgreSQL User's Guide</citetitle>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录