diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index cc7d797159..7e82355425 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -4729,7 +4729,7 @@ testdb=> \set PROMPT1 '%[%033[1;33;40m%]%n@%/%R%[%033[0m%]%# ' To insert a percent sign into your prompt, write %%. The default prompts are - '%/%R%x%# ' for prompts 1 and 2, and + 'n@%/%R%x%# ' for prompts 1 and 2, and '>> ' for prompt 3. diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index 505f99d8e4..84333377f9 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -23,8 +23,8 @@ #define DEFAULT_EDITOR_LINENUMBER_ARG "+" #endif -#define DEFAULT_PROMPT1 "%/%R%x%# " -#define DEFAULT_PROMPT2 "%/%R%x%# " +#define DEFAULT_PROMPT1 "%n@%/%R%x%# " +#define DEFAULT_PROMPT2 "%n@%/%R%x%# " #define DEFAULT_PROMPT3 ">> " /*