8000 I found that when changing databases from within psql the prompt went… · MangeshVC/postgres@e768c41 · GitHub
[go: up one dir, main page]

Skip to content

Commit e768c41

Browse files
committed
I found that when changing databases from within psql the prompt went sort of
strange. bash$ psql disks Welcome to the POSTGRESQL interactive sql monitor: Please read the file COPYRIGHT for copyright terms of POSTGRESQL type \? for help on slash commands type \q to quit type \g or terminate with semicolon to execute query You are currently connected to the database: disks disks=> \c postgres closing connection to database: disks connecting to new database: postgres postgres== 10000 \c disks closing connection to database: postgres connecting to new database: disks disks== \q bash$ Note the => changes to == after a connect and stays that way on subsequent database changes. Submitted by: Keith Parks <emkxp01@mtcc.demon.co.uk>
1 parent 502a653 commit e768c41

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/psql/psql.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.37.2.2 1996/12/14 08:19:40 vadim Exp $
10+
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.37.2.3 1996/12/22 03:26:52 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -791,7 +791,7 @@ do_connect(const char *new_dbname, PsqlSettings * settings)
791791
PQfinish(olddb);
792792
free(settings->prompt);
793793
settings->prompt = malloc(strlen(PQdb(settings->db)) + 10);
794-
sprintf(settings->prompt, "%s%s ", PQdb(settings->db), PROMPT);
794+
sprintf(settings->prompt, "%s%s", PQdb(settings->db), PROMPT);
795795
}
796796
}
797797
}

0 commit comments

Comments
 (0)
0