diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2000-01-12 19:36:36 +0000 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2000-01-12 19:36:36 +0000 |
commit | f6689a328f07fe579d57c1a419fd8b53db7499c7 (patch) | |
tree | e2e62cf090af25a999091eaea74f4a59db4d1c9b /src/bin/psql/prompt.c | |
parent | 267c6c7f060142d9ec2fd39b312e7f7b35cc6f5d (diff) | |
download | postgresql-f6689a328f07fe579d57c1a419fd8b53db7499c7.tar.gz postgresql-f6689a328f07fe579d57c1a419fd8b53db7499c7.zip |
Fixed a few "fixes" and bugs. Adjusted messages and options to GNU suggestions.
Diffstat (limited to 'src/bin/psql/prompt.c')
-rw-r--r-- | src/bin/psql/prompt.c | 15 |
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': |