SQL script prompting for value - Mailing list pgsql-general

From J.R. Onyschak
Subject SQL script prompting for value
Date
Msg-id 3B13D9AB.50003@nvisia.com
Whole thread Raw
List pgsql-general
I would like to have a sql script prompt the user for a value to use for
the rest of the script.  In oracle I would do:

accept city_key prompt 'Enter city key (ex: IL-CITY):'

INSERT INTO city_info (muni_id, contact_first_name, contact_last_name)
VALUES ('&city_key','','');


Is anything like this possible using psql?

Thanks,
J.R.


pgsql-general by date:

Previous
From: "Rick Saunders"
Date:
Subject: Something odd with Postgresql 6.5
Next
From: HYip
Date:
Subject: timeout for a transaction