Re: Run Time Variables - Mailing list pgsql-novice

From Anthony E . Greene
Subject Re: Run Time Variables
Date
Msg-id 20010311085719.C12172@cp5340
Whole thread Raw
In response to Run Time Variables  (Phil Hayward <phil@springfield.uklinux.net>)
List pgsql-novice
On Sat, 10 Mar 2001 13:37:39 Phil Hayward wrote:
>Can anyone assist please?
>In Oracle it is possible to enter variables at run time with a query as
>follows
>
>SELECT name, salary, dept
>FROM emp
>WHERE empid = &empid;
>
>On running the query you will be prompted .....
>
>Enter value for empid:
>
>Is there an equivalent feature in PostgreSql, Psql ?

In pgaccess you can create a query that looks like this:

  select name, salary, dept
  from emp
  where emp_id = '[parameter "Employee ID?"]'

A dialog box will prompt you for input. I don't know of a way to do this
within psql.

Tony
--
Anthony E. Greene <agreene@pobox.com> <http://www.pobox.com/~agreene/>
PGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26  C484 A42A 60DD 6C94 239D
Chat:  AOL/Yahoo: TonyG05    ICQ: 91183266
Linux. The choice of a GNU Generation. <http://www.linux.org/>

pgsql-novice by date:

Previous
From: "mikhail malamud"
Date:
Subject: add primary key
Next
From: "Dax Duskin"
Date:
Subject: array column problem