Re: User input in psql - Mailing list pgsql-sql

From Richard Huxton
Subject Re: User input in psql
Date
Msg-id 4369C0DD.60608@archonet.com
Whole thread Raw
In response to User input in psql  (Ashok Agrawal <Ashok.Agrawal@Sun.COM>)
List pgsql-sql
Ashok Agrawal wrote:
> Hi .
> 
> Just wanted to know what is equivalent of "Oracle &" in postgresql.
> 
> select count(*) from table1 where id =&1 where sqlplus plus will
> prompt to enter value for 1. I would like to do the same in psql.

There isn't an equivalent feature, I'm afraid. There are variables you 
can use, but no interactive prompting.  \set myvar foo  SELECT count(*) FROM table1 WHERE id = :foo;

--   Richard Huxton  Archonet Ltd


pgsql-sql by date:

Previous
From: Ashok Agrawal
Date:
Subject: User input in psql
Next
From: Axel Rau
Date:
Subject: Re: Poor performance in inet << cidr join (Resolved)