Skip site navigation (1) Skip section navigation (2)

psql questions

From: "Walker, Jed S" <Jed_Walker(at)cable(dot)comcast(dot)com>
To: "'pgsql-novice(at)postgresql(dot)org'" <pgsql-novice(at)postgresql(dot)org>
Subject: psql questions
Date: 2005-03-24 23:29:53
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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

Next:From: John DeSoiDate: 2005-03-25 00:07:03
Subject: Re: psql questions
Previous:From: Afton & Ray StillDate: 2005-03-24 20:48:08
Subject: Re: install pgaccess under windows xp

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group