|
From: Thomas G. <to...@ad...> - 2001-10-31 03:48:53
|
On Tue, 30 Oct 2001, John Stoddart wrote:
> Hi guys,
>=20
> Really useful discussion this. I should know, I trudged the same=20
> upgrade path not too long ago ...
>=20
> >The only hassle is recreating users but if you use a web interface
> >like sql ledger even this is no problem as the number of users is
> >generally limited (I have only nobody on pg and one or two on oracle.)
>=20
> Come to think of it, shouldn't this information be in a table so you=20
> could pg_dump it as well?
In the old days the createuser script used to have real queries in it=20
so you could see how the system catalogue was modified when a user=20
was added. Now this script (/usr/local/pgsql/bin/createuser in my
case) is just a fancy front end to:=20
psql -c "CREATE USER $vars" template1
where $vars is the user's responses to a couple of questions.
To get the contents of pg_shadow (on which the pg_users view is based):
pg_dump -t pg_shadow template1 > dumpfile=20
will fail. Apparently some sort of security mechanism.
But you can do this:
psql -c "create table db_shadow as select * from pg_shadow;" db-name
pg_dump -t db_shadow db-name > dumpfile =20
--------------------------------------------------------------------
Saint Vincent Catholic Medical Centers =20
--------------------------------------------------------------------
Thomas Good tomg@ { admin | q8 } .nrnet.org
Programmer/Analyst Phone: 718-818-5528=20
Behavioral Health Services Fax: 718-818-5056 =20
Residential Services Mobile: 917-282-7359 =20
--------------------------------------------------------------------
/* Rekordmeister ist nur der FC Bayern M=FCnchen! */
--------------------------------------------------------------------
|