From 5d547cd236cc8b674bc356f91178994b0169ca23 Mon Sep 17 00:00:00 2001 From: Jan Wieck Date: Thu, 2 Nov 2000 17:33:41 +0000 Subject: [PATCH] Revoked changes for pg_dumpaccounts Script will go into the contrib directory. Jan --- src/bin/pg_dump/Makefile.in | 3 +- src/bin/pg_dump/pg_dumpaccounts | 65 --------------------------------- 2 files changed, 1 insertion(+), 67 deletions(-) delete mode 100644 src/bin/pg_dump/pg_dumpaccounts diff --git a/src/bin/pg_dump/Makefile.in b/src/bin/pg_dump/Makefile.in index 0e8e26ac4da..3d5838a57f8 100644 --- a/src/bin/pg_dump/Makefile.in +++ b/src/bin/pg_dump/Makefile.in @@ -7,7 +7,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/Makefile.in,v 1.13.2.1 2000/11/02 16:54:21 wieck Exp $ +# $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/Makefile.in,v 1.13.2.2 2000/11/02 17:33:41 wieck Exp $ # #------------------------------------------------------------------------- @@ -41,7 +41,6 @@ submake: install: pg_dump $(INSTALL) $(INSTL_EXE_OPTS) pg_dump$(X) $(BINDIR)/pg_dump$(X) $(INSTALL) $(INSTL_EXE_OPTS) pg_dumpall $(BINDIR)/pg_dumpall - $(INSTALL) $(INSTL_EXE_OPTS) pg_dumpaccounts $(BINDIR)/pg_dumpaccounts $(INSTALL) $(INSTL_EXE_OPTS) pg_upgrade $(BINDIR)/pg_upgrade depend dep: diff --git a/src/bin/pg_dump/pg_dumpaccounts b/src/bin/pg_dump/pg_dumpaccounts deleted file mode 100644 index 7d68d153ade..00000000000 --- a/src/bin/pg_dump/pg_dumpaccounts +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/sh -# -# pg_dumpaccounts -# dumps the pg_shadow and pg_group tables, which belong to the -# whole installation rather than any one individual database. -# -# $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/pg_dumpaccounts,v 1.1.2.1 2000/11/02 16:54:21 wieck Exp $ -# -# to adapt to System V vs. BSD 'echo' -if echo '\\' | grep '\\\\' >/dev/null 2>&1 -then - BS='\' # BSD -else - BS='\\' # System V -fi -# -# Dump everyone but the postgres user -# initdb creates him -# -# get the postgres user id -# -POSTGRES_SUPER_USER_ID="`echo \" \ - select datdba \ - from pg_database \ - where datname = 'template1'; \" | \ - psql -A -q -t template1`" -echo "${BS}connect template1" -# -# delete all users in case they run this twice -# -# we don't use POSTGRES_SUPER_USER_ID because the postgres super user id -# could be different on the two installations -# -echo "select datdba into table tmp_pg_shadow \ - from pg_database where datname = 'template1';" -echo "delete from pg_shadow where usesysid <> tmp_pg_shadow.datdba;" -echo "drop table tmp_pg_shadow;" -# -# load all the non-postgres users -# XXX this breaks badly if the layout of pg_shadow ever changes. -# It'd be better to convert the data into CREATE USER commands. -# -echo "copy pg_shadow from stdin;" -psql -q template1 < $POSTGRES_SUPER_USER_ID; -copy tmp_pg_shadow to stdout; -drop table tmp_pg_shadow; -END -echo "${BS}." -# -# copy the pg_group table too -# XXX this breaks badly if the layout of pg_group ever changes. -# It'd be better to convert the data into CREATE GROUP commands. -# -echo "delete from pg_group;" -echo "copy pg_group from stdin;" -psql -q template1 <