aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/prompt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/psql/prompt.c')
-rw-r--r--src/bin/psql/prompt.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/bin/psql/prompt.c b/src/bin/psql/prompt.c
index 22ca579351c..dd41ba54015 100644
--- a/src/bin/psql/prompt.c
+++ b/src/bin/psql/prompt.c
@@ -52,8 +52,7 @@
*
*
* If the application-wide prompts became NULL somehow, the returned string
- * will be empty (not NULL!). Do not free() the result of this function unless
- * you want trouble.
+ * will be empty (not NULL!).
*--------------------------
*/
const char *
@@ -66,9 +65,6 @@ get_prompt(PsqlSettings *pset, promptStatus_t status)
const char *p;
const char *prompt_string;
- if (GetVariable(pset->vars, "quiet"))
- return "";
-
if (status == PROMPT_READY)
prompt_string = GetVariable(pset->vars, "prompt1");
else if (status == PROMPT_CONTINUE || status == PROMPT_SINGLEQUOTE || status == PROMPT_DOUBLEQUOTE || status == PROMPT_COMMENT)
@@ -130,13 +126,8 @@ get_prompt(PsqlSettings *pset, promptStatus_t status)
break;
/* DB server port number */
case '>':
- if (pset->db)
- {
- if (PQhost(pset->db))
- strncpy(buf, PQport(pset->db), MAX_PROMPT_SIZE);
- else
- buf[0] = '.';
- }
+ if (pset->db && PQport(pset->db))
+ strncpy(buf, PQport(pset->db), MAX_PROMPT_SIZE);
break;
/* DB server user name */
case 'n':