1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

> Joe Conway <mail@joeconway.com> writes:

>>ISTM that "source" is worth knowing.
>
> Hm, possibly.  Any other opinions?

This version has the seven fields I proposed, including "source". Here's
an example that shows why I think it's valuable:

regression=# \x
Expanded display is on.
regression=# select * from pg_settings where name = 'enable_seqscan';
-[ RECORD 1 ]-----------
name    | enable_seqscan
setting | on
context | user
vartype | bool
source  | default
min_val |
max_val |

regression=# update pg_settings set setting = 'off' where name =
'enable_seqscan';
-[ RECORD 1 ]---
set_config | off

regression=# select * from pg_settings where name = 'enable_seqscan';
-[ RECORD 1 ]-----------
name    | enable_seqscan
setting | off
context | user
vartype | bool
source  | session
min_val |
max_val |

regression=# alter user postgres set enable_seqscan to 'off';
ALTER USER

(log out and then back in again)

regression=# \x
Expanded display is on.
regression=# select * from pg_settings where name = 'enable_seqscan';
-[ RECORD 1 ]-----------
name    | enable_seqscan
setting | off
context | user
vartype | bool
source  | user
min_val |
max_val |

In the first case, enable_seqscan is set to its default value. After
setting it to off, it is obvious that the value has been changed for the
session only. In the third case, you can see that the value has been set
specifically for the user.

Joe Conway
This commit is contained in:
Bruce Momjian
2003-07-27 04:35:54 +00:00
parent a265b7f70a
commit 38fb906f93
8 changed files with 204 additions and 55 deletions

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.195 2003/07/23 20:30:35 momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.196 2003/07/27 04:35:53 momjian Exp $
-->
<Chapter Id="runtime">
@ -571,14 +571,45 @@ SET ENABLE_SEQSCAN TO OFF;
<row>
<entry><literal>name</literal></entry>
<entry><type>text</type></entry>
<entry>The name of the run-time configuration parameter</entry>
<entry>run-time configuration parameter name</entry>
</row>
<row>
<entry><literal>setting</literal></entry>
<entry><type>text</type></entry>
<entry>The current value of the run-time configuration parameter</entry>
<entry>current value of the parameter</entry>
</row>
<row>
<entry><literal>context</literal></entry>
<entry><type>text</type></entry>
<entry>context required to set the parameter's value</entry>
</row>
<row>
<entry><literal>vartype</literal></entry>
<entry><type>text</type></entry>
<entry>parameter type</entry>
</row>
<row>
<entry><literal>source</literal></entry>
<entry><type>text</type></entry>
<entry>source of the current parameter value</entry>
</row>
<row>
<entry><literal>min_val</literal></entry>
<entry><type>text</type></entry>
<entry>minimum allowed value of the parameter</entry>
</row>
<row>
<entry><literal>max_val</literal></entry>
<entry><type>text</type></entry>
<entry>maximum allowed value of the parameter</entry>
</row>
</tbody>
</tgroup>
</table>