Change transaction status indicator in prompt from %T to %x.

This commit is contained in:
Peter Eisentraut 2003-10-04 01:04:46 +00:00
parent beb935148a
commit 9951474c71
2 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,5 @@
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.97 2003/09/12 02:40:09 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.98 2003/10/04 01:04:46 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
@ -2254,7 +2254,7 @@ testdb=> <userinput>\set content '\'' `sed -e "s/'/\\\\\\'/g" < my_file.txt` '\'
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><literal>%T</literal></term> <term><literal>%x</literal></term>
<listitem> <listitem>
<para> <para>
Transaction status: an empty string when not in a transaction Transaction status: an empty string when not in a transaction

View File

@ -3,7 +3,7 @@
* *
* Copyright (c) 2000-2003, PostgreSQL Global Development Group * Copyright (c) 2000-2003, PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/prompt.c,v 1.29 2003/09/03 22:05:09 petere Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/prompt.c,v 1.30 2003/10/04 01:04:46 petere Exp $
*/ */
#include "postgres_fe.h" #include "postgres_fe.h"
#include "prompt.h" #include "prompt.h"
@ -44,7 +44,7 @@
* or a ! if session is not connected to a database; * or a ! if session is not connected to a database;
* in prompt2 -, *, ', or "; * in prompt2 -, *, ', or ";
* in prompt3 nothing * in prompt3 nothing
* %T - transaction status: empty, *, !, ? (unknown or no connection) * %x - transaction status: empty, *, !, ? (unknown or no connection)
* %? - the error code of the last query (not yet implemented) * %? - the error code of the last query (not yet implemented)
* %% - a percent sign * %% - a percent sign
* *
@ -208,7 +208,7 @@ get_prompt(promptStatus_t status)
} }
break; break;
case 'T': case 'x':
if (!pset.db) if (!pset.db)
buf[0] = '?'; buf[0] = '?';
else else