Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9fb1c79

Browse files
authored
prompt: current_schema added
1 parent 56e5a88 commit 9fb1c79

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎psqlrc/psqlrc‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ with fs as (
4848
select -- pg_backend_pid(), -- if we're connecting through pgbouncer, then prompt's %p is not real, so get real PID
4949

5050
pg_is_in_recovery(), -- primary or standby
51+
current_schema(),
5152

5253
pg_postmaster_start_time()::timestamptz(0) as started_at,
5354
pg_conf_load_time()::timestamptz(0) as loaded_at,
@@ -246,7 +247,7 @@ from coalesce(
246247
\set PROMPT1 :PROMPT1' ':red'primary':reset
247248
\endif
248249

249-
\set PROMPT1 :PROMPT1' ':yellow'%n':cyan'@':orange'%`hostname`':cyan':':green'%>':blue'/%/'
250+
\set PROMPT1 :PROMPT1' ':yellow'%n':cyan'@':orange'%`hostname`':cyan':':green'%>':blue'/%/.':current_schema
250251
\set PROMPT1 :PROMPT1'\n':reset'%x%# '
251252

252253
\set PROMPT2 ''

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /