Re: pg_dumpall (7.1beta1, current CVS)

From: Larry Rosenman <ler(at)lerctr(dot)org>
To: PostgreSQL Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dumpall (7.1beta1, current CVS)
Date: 2001-01-01 01:36:13
Message-ID: 20001231193612.A7748@lerami.lerctr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Larry Rosenman <ler(at)lerctr(dot)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 datdba FROM 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(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2001-01-01 03:57:55 Re: Inheritance docs error.
Previous Message Larry Rosenman 2000-12-31 23:59:17 pg_dumpall (7.1beta1, current CVS)