Re: [DOCS] How to prompt for a value if a variable is not set - Mailing list pgsql-docs

From David G. Johnston
Subject Re: [DOCS] How to prompt for a value if a variable is not set
Date
Msg-id CAKFQuwaQGe3uA2iWjB5xas0R-8KLETU=a+6bytT5E4L_RbaeTA@mail.gmail.com
Whole thread Raw
In response to [DOCS] How to prompt for a value if a variable is not set  (randy@strausses.net)
List pgsql-docs
On Monday, September 18, 2017, <randy@strausses.net> wrote:
But if the variable is not set, I want the script to prompt for
it.

In version 10 this should be doable, we introduced \if conditionals.  You might be able to hack up something via "\!" in 9.6 and earlier (haven't tried it myself).

David J.

pgsql-docs by date:

Previous
From: Tom Lane
Date:
Subject: Re: [DOCS] ALTER GROUP
Next
From: athinivas
Date:
Subject: Re: [DOCS] Creating variable argument user defined functions in C