psql questions - Mailing list pgsql-novice

From Walker, Jed S
Subject psql questions
Date
Msg-id 41669DC6FE3B80449A33A4DD46DB370A09E7E8AF@entcoexch15.broadband.att.com
Whole thread Raw
Responses Re: psql questions
List pgsql-novice
I am trying to figure out how to set a variable in psql and use it and how
to echo information.

in Oracle I can do:
define jed = foo
prompt This is the value of jed
select sysdate, &jed from foo;

and get
This is the value of jed
24-MAR-05  foo

How can do those things in psql?  (I found the \set which seems to work, no
error, but I can't figure out how to use the variable in a psql session)

Thanks in advance,

        Jed S. Walker




pgsql-novice by date:

Previous
From: Afton & Ray Still
Date:
Subject: Re: install pgaccess under windows xp
Next
From: John DeSoi
Date:
Subject: Re: psql questions