Re: How to prompt for a value if a variable is not set

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "randy(at)strausses(dot)net" <randy(at)strausses(dot)net>
Cc: "pgsql-docs(at)postgresql(dot)org" <pgsql-docs(at)postgresql(dot)org>
Subject: Re: How to prompt for a value if a variable is not set
Date: 2017-09-20 15:07:09
Message-ID: CAKFQuwaQGe3uA2iWjB5xas0R-8KLETU=a+6bytT5E4L_RbaeTA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Monday, September 18, 2017, <randy(at)strausses(dot)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.

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message athinivas 2017-09-20 15:12:14 Re: Creating variable argument user defined functions in C
Previous Message Tom Lane 2017-09-20 14:45:54 Re: ALTER GROUP