1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Pass session_authorization to the client and make psql update its prompt

accordingly.
This commit is contained in:
Peter Eisentraut
2003-09-03 22:05:09 +00:00
parent 4e85f760e6
commit 29a20145fd
7 changed files with 54 additions and 15 deletions

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.134 2003/09/01 23:04:49 petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.135 2003/09/03 22:05:01 petere Exp $
-->
<chapter id="libpq">
@ -857,7 +857,8 @@ is not known.
Parameters reported as of the current release include
<literal>server_version</> (cannot change after startup);
<literal>client_encoding</>,
<literal>is_superuser</>, and
<literal>is_superuser</>,
<literal>session_authorization</literal>, and
<literal>DateStyle</>.
</para>

View File

@ -1,4 +1,4 @@
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/protocol.sgml,v 1.42 2003/09/01 23:04:49 petere Exp $ -->
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/protocol.sgml,v 1.43 2003/09/03 22:05:07 petere Exp $ -->
<chapter id="protocol">
<title>Frontend/Backend Protocol</title>
@ -1006,7 +1006,8 @@
<literal>server_version</> (a pseudo-parameter that cannot change after
startup);
<literal>client_encoding</>,
<literal>is_superuser</>, and
<literal>is_superuser</>,
<literal>session_authorization</literal>, and
<literal>DateStyle</>.
This set might change in the future, or even become configurable.
Accordingly, a frontend should simply ignore ParameterStatus for

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.95 2003/08/31 17:32:24 petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.96 2003/09/03 22:05:08 petere Exp $
PostgreSQL documentation
-->
@ -2214,8 +2214,14 @@ testdb=> <userinput>\set content '\'' `sed -e "s/'/\\\\\\'/g" < my_file.txt` '\'
<varlistentry>
<term><literal>%n</literal></term>
<listitem><para>The user name you are connected as (not your local system
user name).</para></listitem>
<listitem>
<para>
The database session user name. (The expansion of this
value might change during a database session as the result
of the command <command>SET SESSION
AUTHORIZATION</command>.)
</para>
</listitem>
</varlistentry>
<varlistentry>
@ -2231,8 +2237,15 @@ testdb=> <userinput>\set content '\'' `sed -e "s/'/\\\\\\'/g" < my_file.txt` '\'
<varlistentry>
<term><literal>%#</literal></term>
<listitem><para>If the current user is a database superuser, then a
<literal>#</literal>, otherwise a <literal>&gt;</literal>.</para></listitem>
<listitem>
<para>
If the session user is a database superuser, then a
<literal>#</literal>, otherwise a <literal>&gt;</literal>.
(The expansion of this value might change during a database
session as the result of the command <command>SET SESSION
AUTHORIZATION</command>.)
</para>
</listitem>
</varlistentry>
<varlistentry>