Commit 2c0edb3c authored by Peter Eisentraut's avatar Peter Eisentraut

Separated set constraints and set transaction reference pages, revised set

reference page to new configuration system. Big update to administrator's
guide, chapters Runtime environment, Client authentication, and User
management, the latter two were part of the old Security chapter.
parent b4e906f1
......@@ -8,7 +8,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.14 2000/05/02 20:01:51 thomas Exp $
# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.15 2000/06/18 21:24:51 petere Exp $
#
#----------------------------------------------------------------------------
......@@ -104,7 +104,7 @@ COMMANDS= abort.sgml alter_group.sgml alter_table.sgml alter_user.sgml \
insert.sgml listen.sgml load.sgml lock.sgml move.sgml \
notify.sgml \
reindex.sgml reset.sgml revoke.sgml rollback.sgml \
select.sgml select_into.sgml set.sgml show.sgml \
select.sgml select_into.sgml set.sgml set_constraints.sgml set_transaction.sgml show.sgml \
truncate.sgml unlisten.sgml update.sgml vacuum.sgml
FUNCTIONS= current_date.sgml current_time.sgml current_timestamp.sgml current_user.sgml
......
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/admin.sgml,v 1.22 2000/05/02 20:01:51 thomas Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/admin.sgml,v 1.23 2000/06/18 21:24:51 petere Exp $
Postgres Administrator's Guide.
Derived from postgres.sgml.
......@@ -27,7 +27,8 @@ Derived from postgres.sgml.
<!entity regress SYSTEM "regress.sgml">
<!entity release SYSTEM "release.sgml">
<!entity runtime SYSTEM "runtime.sgml">
<!entity security SYSTEM "security.sgml">
<!entity client-auth SYSTEM "client-auth.sgml">
<!entity user-manag SYSTEM "user-manag.sgml">
<!entity start-ag SYSTEM "start-ag.sgml">
<!entity trouble SYSTEM "trouble.sgml">
......@@ -111,10 +112,10 @@ Your name here...
&install;
&installw;
&runtime;
&security;
&client-auth;
&user-manag;
&start-ag;
&manage-ag;
&trouble;
&recovery;
&regress;
&release;
......
This diff is collapsed.
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/pg_options.sgml,v 1.5 2000/03/31 03:27:41 thomas Exp $
-->
<Chapter Id="pg-options-dev">
<DocInfo>
<AuthorGroup>
<Author>
<FirstName>Massimo</FirstName>
<Surname>Dal Zotto</Surname>
</Author>
</AuthorGroup>
<Date>Transcribed 1998-10-16</Date>
</DocInfo>
<Title>pg_options</Title>
<Para>
<Note>
<Para>
Contributed by <ULink url="mailto:dz@cs.unitn.it">Massimo Dal Zotto</ULink>
</Para>
</Note>
</para>
<Para>
The optional file <filename>data/pg_options</filename> contains runtime
options used by the backend to control trace messages and other backend
tunable parameters.
What makes this file interesting is the fact that it is re-read by a backend
when it receives a SIGHUP signal, making thus possible to change run-time
options on the fly without needing to restart
<productname>Postgres</productname>.
The options specified in this file may be debugging flags used by the trace
package (<filename>backend/utils/misc/trace.c</filename>) or numeric
parameters which can be used by the backend to control its behaviour.
New options and parameters must be defined in
<filename>backend/utils/misc/trace.c</filename> and
<filename>backend/include/utils/trace.h</filename>.
</para>
<Para>
For example suppose we want to add conditional trace messages and a tunable
numeric parameter to the code in file <filename>foo.c</filename>.
All we need to do is to add the constant TRACE_FOO and OPT_FOO_PARAM into
<filename>backend/include/utils/trace.h</filename>:
<programlisting>
/* file trace.h */
enum pg_option_enum {
...
TRACE_FOO, /* trace foo functions */
OPT_FOO_PARAM, /* foo tunable parameter */
NUM_PG_OPTIONS /* must be the last item of enum */
};
</programlisting>
and a corresponding line in <filename>backend/utils/misc/trace.c</filename>:
<programlisting>
/* file trace.c */
static char *opt_names[] = {
...
"foo", /* trace foo functions */
"fooparam" /* foo tunable parameter */
};
</programlisting>
Options in the two files must be specified in exactly the same order.
In the foo source files we can now reference the new flags with:
<programlisting>
/* file foo.c */
#include "trace.h"
#define foo_param pg_options[OPT_FOO_PARAM]
int
foo_function(int x, int y)
{
TPRINTF(TRACE_FOO, "entering foo_function, foo_param=%d", foo_param);
if (foo_param > 10) {
do_more_foo(x, y);
}
}
</programlisting>
</para>
<para>
Existing files using private trace flags can be changed by simply adding
the following code:
<programlisting>
#include "trace.h"
/* int my_own_flag = 0; -- removed */
#define my_own_flag pg_options[OPT_MY_OWN_FLAG]
</programlisting>
</para>
<para>
All pg_options are initialized to zero at backend startup. If we need a
different default value we must add some initialization code at the beginning
of <function>PostgresMain</function>.
Now we can set the foo_param and enable foo trace by writing values into the
<filename>data/pg_options</filename> file:
<programlisting>
# file pg_options
...
foo=1
fooparam=17
</programlisting>
</para>
<para>
The new options will be read by all new backends when they are started.
To make effective the changes for all running backends we need to send a
SIGHUP to the postmaster. The signal will be automatically sent to all the
backends. We can also activate the changes only for a specific backend by
sending the SIGHUP directly to it.
</para>
<para>
pg_options can also be specified with the <option>-T</option> switch of
<productname>Postgres</productname>:
<programlisting>
postgres <replaceable>options</replaceable> -T "verbose=2,query,hostlookup-"
</programlisting>
</para>
<Para>
The functions used for printing errors and debug messages can now make use
of the <citetitle>syslog(2)</citetitle> facility. Message printed to stdout
or stderr are prefixed by a timestamp containing also the backend pid:
<programlisting>
#timestamp #pid #message
980127.17:52:14.173 [29271] StartTransactionCommand
980127.17:52:14.174 [29271] ProcessUtility: drop table t;
980127.17:52:14.186 [29271] SIIncNumEntries: table is 70% full
980127.17:52:14.186 [29286] Async_NotifyHandler
980127.17:52:14.186 [29286] Waking up sleeping backend process
980127.19:52:14.292 [29286] Async_NotifyFrontEnd
980127.19:52:14.413 [29286] Async_NotifyFrontEnd done
980127.19:52:14.466 [29286] Async_NotifyHandler done
</programlisting>
</para>
<para>
This format improves readability of the logs and allows people to understand
exactly which backend is doing what and at which time. It also makes
easier to write simple awk or perl scripts which monitor the log to
detect database errors or problem, or to compute transaction time statistics.
</para>
<para>
Messages printed to syslog use the log facility LOG_LOCAL0.
The use of syslog can be controlled with the syslog pg_option.
Unfortunately many functions call directly <function>printf()</function>
to print their messages to stdout or stderr and this output can't be
redirected to syslog or have timestamps in it.
It would be advisable that all calls to printf would be replaced with the
PRINTF macro and output to stderr be changed to use EPRINTF instead so that
we can control all output in a uniform way.
</Para>
<Para>
The new pg_options mechanism is more convenient than defining new backend
option switches because:
<ItemizedList Mark="bullet" Spacing="compact">
<ListItem>
<Para>
we don't have to define a different switch for each thing we want to control.
All options are defined as keywords in an external file stored in the data
directory.
</Para>
</ListItem>
<ListItem>
<Para>
we don't have to restart <productname>Postgres</productname> to change
the setting of some option.
Normally backend options are specified to the postmaster and passed to each
backend when it is started. Now they are read from a file.
</Para>
</ListItem>
<ListItem>
<Para>
we can change options on the fly while a backend is running. We can thus
investigate some problem by activating debug messages only when the problem
appears. We can also try different values for tunable parameters.
</Para>
</ListItem>
</ItemizedList>
The format of the <filename>pg_options</filename> file is as follows:
<programlisting>
# <replaceable>comment</replaceable>
<replaceable>option</replaceable>=<replaceable class="parameter">integer_value</replaceable> # set value for <replaceable>option</replaceable>
<replaceable>option</replaceable> # set <replaceable>option</replaceable> = 1
<replaceable>option</replaceable>+ # set <replaceable>option</replaceable> = 1
<replaceable>option</replaceable>- # set <replaceable>option</replaceable> = 0
</programlisting>
Note that <replaceable class="parameter">keyword</replaceable> can also be
an abbreviation of the option name defined in
<filename>backend/utils/misc/trace.c</filename>.
</Para>
<para>
Refer to <citetitle>The Administrator's Guide</citetitle> chapter
on runtime options for a complete list of currently supported
options.
</para>
<Para>
Some of the existing code using private variables and option switches has
been changed to make use of the pg_options feature, mainly in
<filename>postgres.c</filename>. It would be advisable to modify
all existing code
in this way, so that we can get rid of many of the switches on
the <productname>Postgres</productname> command line
and can have more tunable options
with a unique place to put option values.
</Para>
</Chapter>
<!-- Keep this comment at the end of the file
Local variables:
mode:sgml
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"./reference.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:("/usr/lib/sgml/catalog")
sgml-local-ecat-files:nil
End:
-->
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/postgres.sgml,v 1.36 2000/05/02 20:01:52 thomas Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/postgres.sgml,v 1.37 2000/06/18 21:24:51 petere Exp $
-->
<!doctype book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
......@@ -58,9 +58,9 @@ $Header: /cvsroot/pgsql/doc/src/sgml/postgres.sgml,v 1.36 2000/05/02 20:01:52 th
<!entity regress SYSTEM "regress.sgml">
<!entity release SYSTEM "release.sgml">
<!entity runtime SYSTEM "runtime.sgml">
<!entity security SYSTEM "security.sgml">
<!entity client-auth SYSTEM "client-auth.sgml">
<!entity user-manag SYSTEM "user-manag.sgml">
<!entity start-ag SYSTEM "start-ag.sgml">
<!entity trouble SYSTEM "trouble.sgml">
<!-- programmer's guide -->
<!entity arch-pg SYSTEM "arch-pg.sgml">
......@@ -100,10 +100,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/postgres.sgml,v 1.36 2000/05/02 20:01:52 th
<!entity docguide SYSTEM "docguide.sgml">
<!entity geqo SYSTEM "geqo.sgml">
<!entity index SYSTEM "index.sgml">
<!entity options SYSTEM "pg_options.sgml">
<!entity page SYSTEM "page.sgml">
<!entity protocol SYSTEM "protocol.sgml">
<!entity signals SYSTEM "signals.sgml">
<!entity sources SYSTEM "sources.sgml">
]>
<!-- entity manpages SYSTEM "man/manpages.sgml" subdoc -->
......@@ -225,10 +223,10 @@ Your name here...
&install;
&installw;
&runtime;
&security;
&client-auth;
&user-manag;
&start-ag;
&manage-ag;
&trouble;
&recovery;
&regress;
&release;
......@@ -292,7 +290,6 @@ Your name here...
</partintro>
&sources;
&arch-dev;
&options;
&geqo;
<!--
This listing of Postgres catalogs is currently just a copy of the old
......@@ -301,7 +298,6 @@ Your name here...
&catalogs;
-->
&protocol;
&signals;
&compiler;
&bki;
&page;
......
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/programmer.sgml,v 1.26 2000/05/02 20:01:52 thomas Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/programmer.sgml,v 1.27 2000/06/18 21:24:51 petere Exp $
Postgres Programmer's Guide.
-->
......@@ -50,10 +50,8 @@ Postgres Programmer's Guide.
<!entity cvs SYSTEM "cvs.sgml">
<!entity docguide SYSTEM "docguide.sgml">
<!entity geqo SYSTEM "geqo.sgml">
<!entity options SYSTEM "pg_options.sgml">
<!entity page SYSTEM "page.sgml">
<!entity protocol SYSTEM "protocol.sgml">
<!entity signals SYSTEM "signals.sgml">
<!entity sources SYSTEM "sources.sgml">
]>
......@@ -165,7 +163,6 @@ Disable it until we put in some info.
&sources;
&arch-dev;
&options;
&geqo;
<!--
This listing of Postgres catalogs is currently just a copy of the old
......@@ -174,7 +171,6 @@ Disable it until we put in some info.
&catalogs;
-->
&protocol;
&signals;
&compiler;
&bki;
&page;
......
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/allfiles.sgml,v 1.18 2000/04/14 15:17:28 thomas Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/allfiles.sgml,v 1.19 2000/06/18 21:24:51 petere Exp $
Postgres documentation
Complete list of usable sgml source files in this directory.
-->
......@@ -98,6 +98,8 @@ Complete list of usable sgml source files in this directory.
<!entity select system "select.sgml">
<!entity selectInto system "select_into.sgml">
<!entity set system "set.sgml">
<!entity setConstraints system "set_constraints.sgml">
<!entity setTransaction system "set_transaction.sgml">
<!entity show system "show.sgml">
<!entity truncate system "truncate.sgml">
<!entity unlisten system "unlisten.sgml">
......
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/commands.sgml,v 1.25 2000/04/14 15:17:28 thomas Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/commands.sgml,v 1.26 2000/06/18 21:24:51 petere Exp $
Postgres documentation
-->
......@@ -72,6 +72,8 @@ Postgres documentation
&select;
&selectInto;
&set;
&setConstraints;
&setTransaction;
&show;
&truncate;
&unlisten;
......
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/reset.sgml,v 1.8 2000/04/08 02:39:02 tgl Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/reset.sgml,v 1.9 2000/06/18 21:24:51 petere Exp $
Postgres documentation
-->
<refentry id="SQL-RESET">
<refmeta>
<refentrytitle id="SQL-RESET-TITLE">
RESET
</refentrytitle>
<refentrytitle id="SQL-RESET-TITLE">RESET</refentrytitle>
<refmiscinfo>SQL - Language Statements</refmiscinfo>
</refmeta>
<refnamediv>
<refname>
RESET
</refname>
<refpurpose>
Restores run-time parameters for session to default values
</refpurpose>
<refname>RESET</refname>
<refpurpose>Restores run-time parameters to default values</refpurpose>
</refnamediv>
<refsynopsisdiv>
<refsynopsisdivinfo>
<date>1999-07-20</date>
</refsynopsisdivinfo>
<synopsis>
RESET <replaceable class="PARAMETER">variable</replaceable>
</synopsis>
<refsect2 id="R2-SQL-RESET-1">
<refsect2info>
<date>1998-09-24</date>
</refsect2info>
<title>
Inputs
</title>
<title>Inputs</title>
<para>
<variablelist>
<varlistentry>
<term><replaceable class="PARAMETER">variable</replaceable></term>
<listitem>
<para>
Refer to
<xref linkend="sql-set-title" endterm="sql-set-title">
for more information on available variables.
The name of a run-time parameter. See <xref
linkend="sql-set-title" endterm="sql-set-title"> for a list.
</para>
</listitem>
</varlistentry>
......@@ -49,107 +34,55 @@ RESET <replaceable class="PARAMETER">variable</replaceable>
</para>
</refsect2>
<refsect2 id="R2-SQL-RESET-2">
<refsect2info>
<date>1998-09-24</date>
</refsect2info>
<title>
Outputs
</title>
<para>
<variablelist>
<varlistentry>
<term><computeroutput>
RESET VARIABLE
</computeroutput></term>
<listitem>
<para>
Message returned if
<replaceable class="PARAMETER">variable</replaceable> is successfully reset
to its default value.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect2>
</refsynopsisdiv>
<refsect1 id="R1-SQL-RESET-1">
<refsect1info>
<date>1998-09-24</date>
</refsect1info>
<title>
Description
</title>
<refsect1>
<title>Description</title>
<para>
<command>RESET</command> restores variables to their
default values.
Refer to
<command>RESET</command> restores run-time parameters to their
default values. Refer to
<xref linkend="sql-set-title" endterm="sql-set-title">
for details on allowed values and defaults.
<command>RESET</command> is an alternate form for
for details. <command>RESET</command> is an alternate form for
<synopsis>
SET <replaceable class="parameter">variable</replaceable> = DEFAULT
SET <replaceable class="parameter">variable</replaceable> TO DEFAULT
</synopsis>
</para>
</refsect1>
<refsect2 id="R2-SQL-RESET-3">
<refsect2info>
<date>1998-09-24</date>
</refsect2info>
<title>
Notes
</title>
<para>
See also
<xref linkend="sql-set-title" endterm="sql-set-title"> and
<xref linkend="sql-show-title" endterm="sql-show-title">
to manipulate variable values.
</para>
</refsect2>
<refsect1>
<title>Diagnostics</title>
<para>
See under the <xref linkend="sql-set-title"
endterm="sql-set-title"> command.
</para>
</refsect1>
<refsect1 id="R1-SQL-RESET-2">
<title>
Usage
</title>
<refsect1>
<title>Examples</title>
<para>
Set DateStyle to its default value:
<programlisting>
<screen>
RESET DateStyle;
</programlisting>
</screen>
</para>
<para>
Set Geqo to its default value:
<programlisting>
<screen>
RESET GEQO;
</programlisting>
</screen>
</para>
</refsect1>
<refsect1 id="R1-SQL-RESET-3">
<title>
Compatibility
</title>
<refsect1>
<title>Compatibility</title>
<refsect2 id="R2-SQL-RESET-4">
<refsect2info>
<date>1998-09-24</date>
</refsect2info>
<title>
SQL92
</title>
<para>
There is no <command>RESET</command> in <acronym>SQL92</acronym>.
</para>
</refsect2>
<para>
<command>RESET</command> is a <productname>Postgres</productname> extension.
</para>
</refsect1>
</refentry>
......
This diff is collapsed.
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_constraints.sgml,v 1.1 2000/06/18 21:24:54 petere Exp $ -->
<refentry id="SQL-SET-CONSTRAINTS">
<refmeta>
<refentrytitle id="SQL-SET-CONSTRAINTS-title">SET CONSTRAINTS</refentrytitle>
<refmiscinfo>SQL - Language Statements</refmiscinfo>
</refmeta>
<refnamediv>
<refname>SET CONSTRAINTS</refname>
<refpurpose>Set the constraint mode of the current SQL-transaction</refpurpose>
</refnamediv>
<refsynopsisdiv>
<refsynopsisdivinfo>
<date>2000-06-01</date>
</refsynopsisdivinfo>
<synopsis>
SET CONSTRAINTS { ALL | <replaceable class="parameter">constraint</replaceable> [, ...] } { DEFERRED | IMMEDIATE }
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
<command>SET CONSTRAINTS</command> sets the behavior of constraint
evaluation in the current transaction. In
<option>IMMEDIATE</option> mode, constraints are checked at the end
of each statement. In <option>DEFERRED</option> mode, constraints
are not checked until transaction commit.
</para>
<para>
Upon creation, a constraint is always give one of three
characteristics: <option>INITIALLY DEFERRED</option>,
<option>INITIALLY IMMEDIATE DEFERRABLE</option>, or
<option>INITIALLY IMMEDIATE NOT DEFERRABLE</option>. The third
class is not affected by the <command>SET CONSTRAINTS</command>
command.
</para>
<para>
Currently, only foreign key constraints are affected by this
setting. Check and unique constraints are always effectively
initially immediate not deferrable.
</para>
</refsect1>
<refsect1>
<title>Compatibility</title>
<para>
SQL92, SQL99
</para>
</refsect1>
</refentry>
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_transaction.sgml,v 1.1 2000/06/18 21:24:54 petere Exp $ -->
<refentry id="SQL-SET-TRANSACTION">
<refmeta>
<refentrytitle id="SQL-SET-TRANSACTION-title">SET TRANSACTION</refentrytitle>
<refmiscinfo>SQL - Language Statements</refmiscinfo>
</refmeta>
<refnamediv>
<refname>SET TRANSACTION</refname>
<refpurpose>Set the characteristics of the current SQL-transaction</refpurpose>
</refnamediv>
<refsynopsisdiv>
<refsynopsisdivinfo>
<date>2000-06-01</date>
</refsynopsisdivinfo>
<synopsis>
SET TRANSACTION ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE }
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
The <command>SET TRANSACTION</command> command sets the
characteristics for the current SQL-transaction. It has no effect
on any subsequent transactions. This command cannot be used after
the first DML statement (<command>SELECT</command>,
<command>INSERT</command>, <command>DELETE</command>,
<command>UPDATE</command>, <command>FETCH</command>,
<command>COPY</command>) of a transaction has been executed.
</para>
<para>
The isolation level of a transaction determines what data the
transaction can see when other transactions are running concurrently.
<variablelist>
<varlistentry>
<term>READ COMMITTED</term>
<listitem>
<para>
A statement can only see rows committed before it began. This
is the default.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>SERIALIZABLE</term>
<listitem>
<para>
The current transaction can only see rows committed before
first DML statement was executed in this transaction.
</para>
<tip>
<para>
Intuitively, serializable means that two concurrent
transactions will leave the database in the same state as if
the two has been executed strictly after one another in either
order.
</para>
</tip>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1>
<title>Compatibility</title>
<para>
SQL92, SQL99
</para>
<para>
SERIALIZABLE is the default level in <acronym>SQL</acronym>.
Postgres does not provide the isolation levels <option>READ
UNCOMMITTED</option> and <option>REPEATABLE READ</option>. Because
of multi-version concurrency control, the serializable level is not
truly serializable. See the <citetitle>User's Guide</citetitle> for
details.
</para>
<para>
In <acronym>SQL</acronym> there are two other transaction
characteristics that can be set with this command: whether the
transaction is read-only and the size of the diagnostics area.
Neither of these concepts are supported in Postgres.
</para>
</refsect1>
</refentry>
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/show.sgml,v 1.9 2000/04/08 02:39:02 tgl Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/show.sgml,v 1.10 2000/06/18 21:24:54 petere Exp $
Postgres documentation
-->
<refentry id="SQL-SHOW">
<refmeta>
<refentrytitle id="SQL-SHOW-TITLE">
SHOW
</refentrytitle>
<refentrytitle id="SQL-SHOW-TITLE">SHOW</refentrytitle>
<refmiscinfo>SQL - Language Statements</refmiscinfo>
</refmeta>
<refnamediv>
<refname>
SHOW
</refname>
<refpurpose>
Shows run-time parameters for session
</refpurpose>
<refname>SHOW</refname>
<refpurpose>Shows run-time parameters</refpurpose>
</refnamediv>
<refsynopsisdiv>
<refsynopsisdivinfo>
<date>1999-07-20</date>
</refsynopsisdivinfo>
<synopsis>
SHOW <replaceable class="PARAMETER">keyword</replaceable>
SHOW <replaceable class="PARAMETER">name</replaceable>
</synopsis>
<refsect2 id="R2-SQL-SHOW-1">
<refsect2info>
<date>1998-09-24</date>
</refsect2info>
<title>
Inputs
</title>
<title>Inputs</title>
<para>
<variablelist>
<varlistentry>
<term><replaceable class="PARAMETER">keyword</replaceable></term>
<term><replaceable class="PARAMETER">name</replaceable></term>
<listitem>
<para>
Refer to
The name of a run-time parameter. See
<xref linkend="sql-set-title" endterm="sql-set-title">
for more information on available variables.
for a list.
</para>
</listitem>
</varlistentry>
......@@ -50,41 +36,43 @@ SHOW <replaceable class="PARAMETER">keyword</replaceable>
</para>
</refsect2>
<refsect2 id="R2-SQL-SHOW-2">
<refsect2info>
<date>1998-09-24</date>
</refsect2info>
<title>
Outputs
</title>
</refsynopsisdiv>
<refsect1 id="R1-SQL-SHOW-1">
<title>Description</title>
<para>
<command>SHOW</command> will display the current setting of a
run-time parameter. These variables can be set using the
<command>SET</command> statement or are determined at server start.
</para>
</refsect1>
<refsect1>
<title>Diagnostics</title>
<para>
<variablelist>
<varlistentry>
<term><computeroutput>
NOTICE: <replaceable class="PARAMETER">variable</replaceable> is <replaceable>value</replaceable>
</computeroutput></term>
<term><computeroutput>ERROR: not a valid option name: <replaceable>name</replaceable></computeroutput></term>
<listitem>
<para>
Message returned if successful.
Message returned if <replaceable>variable</replaceable> does
not stand for an existing parameter.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>
NOTICE: Unrecognized variable <replaceable>value</replaceable>
</computeroutput></term>
<term><computeroutput>ERROR: permission denied</computeroutput></term>
<listitem>
<para>
Message returned if <returnvalue>variable</returnvalue> does not exist.
You must be a superuser to be allowed to see certain settings.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>
NOTICE: Time zone is unknown
</computeroutput></term>
<term><computeroutput>NOTICE: Time zone is unknown</computeroutput></term>
<listitem>
<para>
If the <envar>TZ</envar> or <envar>PGTZ</envar> environment
......@@ -94,82 +82,35 @@ NOTICE: Time zone is unknown
</varlistentry>
</variablelist>
</para>
</refsect2>
</refsynopsisdiv>
<refsect1 id="R1-SQL-SHOW-1">
<refsect1info>
<date>1998-09-24</date>
</refsect1info>
<title>
Description
</title>
<para>
<command>SHOW</command> will display the current setting of a
run-time parameter during a session.
</para>
<para>
These variables can be set using the <command>SET</command> statement,
and
can be restored to the default values using the <command>RESET</command>
statement.
Parameters and values are case-insensitive.
</para>
<refsect2 id="R2-SQL-SHOW-3">
<refsect2info>
<date>1998-09-24</date>
</refsect2info>
<title>
Notes
</title>
<para>
See also
<xref linkend="sql-set-title" endterm="sql-set-title"> and
<xref linkend="sql-reset-title" endterm="sql-reset-title">
to manipulate variable values.
</para>
</refsect2>
</refsect1>
<refsect1 id="R1-SQL-SHOW-2">
<title>
Usage
</title>
<title>Examples</title>
<para>
Show the current <literal>DateStyle</literal> setting:
<programlisting>
<screen>
SHOW DateStyle;
NOTICE: DateStyle is ISO with US (NonEuropean) conventions
</programlisting>
</screen>
</para>
<para>
Show the current genetic optimizer (<literal>geqo</literal>) setting:
<programlisting>
<screen>
SHOW GEQO;
NOTICE: GEQO is ON beginning with 11 relations
</programlisting>
NOTICE: geqo = true
</screen>
</para>
</refsect1>
<refsect1 id="R1-SQL-SHOW-3">
<title>
Compatibility
</title>
<title>Compatibility</title>
<refsect2 id="R2-SQL-SHOW-4">
<refsect2info>
<date>1998-09-24</date>
</refsect2info>
<title>
SQL92
</title>
<para>
There is no <command>SHOW</command> defined in <acronym>SQL92</acronym>.
</para>
</refsect2>
<para>
The <command>SHOW</command> command is a
<productname>Postgres</productname> extension.
</para>
</refsect1>
</refentry>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/start-ag.sgml,v 1.10 2000/03/31 03:27:41 thomas Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/start-ag.sgml,v 1.11 2000/06/18 21:24:51 petere Exp $
- This file currently contains several small chapters.
- Each chapter should be split off into a separate source file...
- - thomas 1998-02-24
-->
<chapter id="newuser">
<title>Adding and Deleting Users</title>
<para>
<application>createuser</application> enables specific users to access
<productname>Postgres</productname>.
<application>dropuser</application> removes users and
prevents them from accessing <productname>Postgres</productname>.
</para>
<para>
These commands only affect users with respect to
<productname>Postgres</productname>;
they have no effect on a user's other privileges or status with regards
to the underlying operating system.
</para>
</chapter>
<chapter id="disk">
<title>Disk Management</title>
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment