Psql Internal Variable question - Mailing list pgsql-general

From Prafulla Tekawade
Subject Psql Internal Variable question
Date
Msg-id BANLkTikqfNHL97ijkqyxunnV4RjpCu8eFA@mail.gmail.com
Whole thread Raw
Responses Re: Psql Internal Variable question
List pgsql-general
Hi,

I am trying to use psql \set and \echo commands to set some internal variables.
My variable starts with single quote and ends with single quote.
That is actual value of the variable.

Eg.
set cur_db 'pgdb'
\echo :cur_db
--I am expecting here 'pgdb' but psql shows pgdb

As mentioned above, I am expecting \echo to return 'pgdb' to me but it returns pgdb.
I tried using escape char, but it did not work.
Can somebody help me?



--
Thanks
Prafulla

pgsql-general by date:

Previous
From: Brendan Jurd
Date:
Subject: Re: search_path versus dynamic CREATE SCHEMA
Next
From: Pavel Stehule
Date:
Subject: Re: Psql Internal Variable question