What is the difference between postgres=#
and postgres-#
? I tried googling it and looking on the official site but could not get a hit for the symbols.
PostgreSQL – Understanding psql Prompts
postgresqlpsql
Related Question
- Postgresql – How to concatenate psql variables
- Postgresql – psql, getting a list of databases to be parsed by a script
- PostgreSQL – Understanding the Output of \d
Command
- Postgresql – psql equivalent of bash’s reverse-search-history
- PostgreSQL – Avoid Output Disappearing in psql
- PostgreSQL Connection Timeout Issues – Troubleshooting Guide
Best Answer
psql
has three different prompts, source:You can see the defaults with
\set
in PSQL, or looking here in the source codeThese are all format strings. They render different in different prompt levels, from the source above describing
%R
,So there ya have it,
%R
changes based on the PROMPT level.