\prompt for psql

From: "Chad Wagner" <chad(dot)wagner(at)gmail(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: \prompt for psql
Date: 2007-02-08 03:21:23
Message-ID: 81961ff50702071921y31492a99xaa8e0002fb2c4b51@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

This adds the ability to "prompt" for internal variable input, below are
examples:

test=# \prompt x
Enter value for "x": 3
test=# select * from foo where x = :x;
x
---
3
(1 row)

test=# \prompt x Enter x:
Enter x: 4
test=# select * from foo where x = :x;
x
---
4
(1 row)

====

The input is limited to 4k, should be reasonable enough. Patch is against
CVS HEAD.

Attachment Content-Type Size
psql_prompt.diff application/octet-stream 2.8 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2007-02-08 03:22:30 Re: [GENERAL] date comparisons
Previous Message Bruce Momjian 2007-02-08 02:14:27 Re: TM formating patch