pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: randy@strausses.net
To: pgsql-docs@postgresql.org
Subject: How to prompt for a value if a variable is not set
Date: Tue, 19 Sep 2017 03:03:11 +0000
Message-ID: <20170919030311.17350.55315@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-docs>

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.2/static/app-psql.html
Description:

I want to make a small script to show the primary key for a table and put
the name into a variable.

Called from another script, the tablename is set in a variable called
tablename.  But if the variable is not set, I want the script to prompt for
it.

Is there a way to do this?
thx,
-r

-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


view thread (2+ messages)  latest in thread

Message-ID: <20170919030311.17350.55315@wrigleys.postgresql.org>
Permalink:  ../20170919030311.17350.55315@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20170919030311.17350.55315@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: randy@strausses.net
  Subject: Re: How to prompt for a value if a variable is not set
  In-Reply-To: <20170919030311.17350.55315@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox