* Larry Rosenman <ler@lerctr.org> [001231 17:59]:
> I noticed today that pg_dumpall from current CVS does *NOT*
> dump a password assiged to the postgres user.
>
> I consider this BAD, since if one has to restore from
> a pg_dumpall, one may forget to reset the password.
>
> LER
And, it was easier than I thought to fix it....
Here is a patch:
Index: src/bin/pg_dump/pg_dumpall.sh
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/bin/pg_dump/pg_dumpall.sh,v
retrieving revision 1.9
diff -c -r1.9 pg_dumpall.sh
*** src/bin/pg_dump/pg_dumpall.sh 2000/12/19 22:12:47 1.9
--- src/bin/pg_dump/pg_dumpall.sh 2001/01/01 01:33:58
***************
*** 164,169 ****
--- 164,174 ---- || CAST(valuntil AS TIMESTAMP) || '''' ELSE '' END || ';' FROM pg_shadow WHERE usesysid <> (SELECT
datdbaFROM pg_database WHERE datname = 'template0');
+ SELECT 'ALTER USER "' || usename || '"'
+ || CASE WHEN passwd IS NOT NULL THEN ' PASSWORD ''' || passwd || '''' ELSE ''
+ END || ';'
+ FROM pg_shadow
+ WHERE usesysid = (SELECT datdba FROM pg_database WHERE datname = 'template0'); __END__ echo
--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749