worried about PGPASSWORD drop - Mailing list pgsql-general

From Christoph Dalitz
Subject worried about PGPASSWORD drop
Date
Msg-id 20020828153552.2a1b1cc3.christoph.dalitz@hs-niederrhein.de
Whole thread Raw
Responses Re: worried about PGPASSWORD drop  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
In the TODO list on http://developer.postgresql.org/todo.php,
I found the following entry:

 - Remove PGPASSWORD because it is insecure on some OS's, in 7.4

Why?

I see the following problems:
 - This will make psql no longer usable in scripts as PGPASSWORD is
   currently the *only* way to pass a password to psql
 - The alternative (a new command line option for password) is much more insecure,
   as then the password is readable by everybody from the process table

In case PGPASSWORD is dropped, there should be a working way to use psql
in scripts. Maybe you could manage to make the following code work:

    psql -U user dbname <<EOF
    password
    /* SQL-Statements */
    EOF

(For some strange reason this works with Oracle's sqlplus, but not with psql)

Christoph Dalitz

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Uninitialized page on pg_class ?
Next
From: Tom Lane
Date:
Subject: Re: worried about PGPASSWORD drop