Specifying psql password on command line - Mailing list pgsql-general

From Tauren Mills
Subject Specifying psql password on command line
Date
Msg-id NBBBLBKDJMGDNPMDGAABKEAGAEAB.tauren@servlets.net
Whole thread Raw
Responses Re: Specifying psql password on command line  (Anand Raman <araman@india-today.com>)
Re: Specifying psql password on command line  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
I've read the documentation for the psql commands as well as the createdb
and dropdb commands.  It looks like there is no way to specify the password
on the command line.  The password is always provided in the form of a stdin
prompt.

This makes it very difficult to use the commands from a shell script or a
cron job.    The same with redirecting to/from a file or piping it
somewhere.  It seems like there must be some way to specify the password on
the command line.

Am I missing something?  Any workarounds?

Thanks,
Tauren



pgsql-general by date:

Previous
From: "Andrew Snow"
Date:
Subject: RE: XML question
Next
From: Severin Olloz
Date:
Subject: ORDER BY Problem