|
7 | 7 | * |
8 | 8 | * |
9 | 9 | * IDENTIFICATION |
10 | | - * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.35 1996/11/26 07:38:28 bryanh Exp $ |
| 10 | + * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.36 1996/11/30 03:41:20 momjian Exp $ |
11 | 11 | * |
12 | 12 | *------------------------------------------------------------------------- |
13 | 13 | */ |
@@ -1272,6 +1272,13 @@ MainLoop(PsqlSettings * settings, FILE * source) |
1272 | 1272 | line=strdup(query); |
1273 | 1273 | query[0]='\0'; |
1274 | 1274 | }else { |
| 1275 | +sprintf(settings->prompt,"%s%s",PQdb(settings->db),PROMPT); |
| 1276 | +if (in_quote) |
| 1277 | +settings->prompt[strlen(settings->prompt)-3]='\''; |
| 1278 | +elseif (query[0]!='\0'&& !querySent) |
| 1279 | +settings->prompt[strlen(settings->prompt)-3]='-'; |
| 1280 | +else |
| 1281 | +settings->prompt[strlen(settings->prompt)-3]='='; |
1275 | 1282 | line=GetNextLine(settings->prompt,source); |
1276 | 1283 | if (interactive&&settings->useReadline&&line!=NULL) |
1277 | 1284 | add_history(line);/* save non-empty lines in history */ |
|