| From: | John DeSoi <desoi(at)pgedit(dot)com> |
|---|---|
| To: | "Ferrell, Denise D CTR NSWCDD, H11" <denise(dot)ferrell(dot)ctr(at)navy(dot)mil> |
| Cc: | "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
| Subject: | Re: Passing parameters |
| Date: | 2016-03-22 15:07:21 |
| Message-ID: | 71A20608-90F0-4CB1-8910-9A08CBDCF421@pgedit.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin |
> On Mar 22, 2016, at 9:44 AM, Ferrell, Denise D CTR NSWCDD, H11 <denise(dot)ferrell(dot)ctr(at)navy(dot)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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | jblinebury | 2016-03-23 14:35:56 | Fw: new important message |
| Previous Message | Scott Whitney | 2016-03-22 15:01:03 | Re: Passing parameters |