Created
January 30, 2023 22:17
-
-
Save PostgreSqlStan/cb80594a5d399768587433432286fba2 to your computer and use it in GitHub Desktop.
psql shortcut to save/restore original PROMPT1 setting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- add to .psqlrc before changing PROMPT1 | |
-- restores PROMPT1 to original setting | |
-- to use enter ":reset_prompt" (w/o quotes) | |
SELECT FORMAT($$\set PROMPT1 '%s'$$, :'PROMPT1') AS reset_prompt \gset |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment