From: John DeSoi <desoi@pgedit.com>
To: Ferrell, Denise D CTR NSWCDD, H11 <denise.ferrell.ctr@navy.mil>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: Passing parameters
Date: Tue, 22 Mar 2016 10:07:21 -0500
Message-ID: <71A20608-90F0-4CB1-8910-9A08CBDCF421@pgedit.com> (raw)
In-Reply-To: <2BC18916DE4BF141AC1EFC55CE2CAE7D1BBB644F@NAEANRFKXM01V.nadsusea.nads.navy.mil>
References: <2BC18916DE4BF141AC1EFC55CE2CAE7D1BBB644F@NAEANRFKXM01V.nadsusea.nads.navy.mil>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
> On Mar 22, 2016, at 9:44 AM, Ferrell, Denise D CTR NSWCDD, H11 <denise.ferrell.ctr@navy.mil> wrote:
>
> I've got a script that I'm running from the Linux command prompt that I need to pass 2 parameter's into the psql script without using the VI Editor. Is there an easy way to accomplish this?
>
> psql <database> -f <scriptname> -l <log_file>
See the psql command line variable options (-v, --set, --variable).
http://www.postgresql.org/docs/9.5/static/app-psql.html#APP-PSQL-VARIABLES
John DeSoi, Ph.D.
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
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-admin@postgresql.org
Cc: desoi@pgedit.com, denise.ferrell.ctr@navy.mil
Subject: Re: Passing parameters
In-Reply-To: <71A20608-90F0-4CB1-8910-9A08CBDCF421@pgedit.com>
* 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