Can we do something like
\echo 'Type username to show its properties';
SELECT * FROM mY_users WHERE username = ?;
\echo 'End of script';
in a psql script file ?
The system would wait until we enter something then echo the ‘End of script’ string.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I just realized that internal doesn’t mean variable defined into postgresql.conf.
So, I can use
\promptEDIT
Like command \echo, you don’t need to add a
;at the end. In fact, if you add one when using\prompt, you get an error.You can show use the value read from the stdin.