Psql Internal Variable question

From: Prafulla Tekawade <prafulla(dot)tekawade(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Psql Internal Variable question
Date: 2011-06-01 03:49:53
Message-ID: BANLkTikqfNHL97ijkqyxunnV4RjpCu8eFA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Prafulla Tekawade 2011-06-01 03:52:45 Psql Internal Variable question
Previous Message Craig Ringer 2011-06-01 03:39:07 Re: Consistency of distributed transactions