Commit a53d8540 authored by Bruce Momjian's avatar Bruce Momjian

pg_dump, pg_dumpall cleanups.

parent 374b0009
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: pg_dump.h,v 1.15 1997/06/02 02:52:06 scrappy Exp $ * $Id: pg_dump.h,v 1.16 1997/06/21 16:08:15 momjian Exp $
* *
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2 * Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
* *
...@@ -38,6 +38,7 @@ typedef struct _typeInfo { ...@@ -38,6 +38,7 @@ typedef struct _typeInfo {
char* typdelim; char* typdelim;
char* typdefault; char* typdefault;
char* typrelid; char* typrelid;
char* usename;
int passedbyvalue; int passedbyvalue;
int isArray; int isArray;
} TypeInfo; } TypeInfo;
...@@ -53,6 +54,7 @@ typedef struct _funcInfo { ...@@ -53,6 +54,7 @@ typedef struct _funcInfo {
int retset; /* 1 if the function returns a set, 0 otherwise */ int retset; /* 1 if the function returns a set, 0 otherwise */
char* prosrc; char* prosrc;
char* probin; char* probin;
char* usename;
int dumped; /* 1 if already dumped */ int dumped; /* 1 if already dumped */
} FuncInfo; } FuncInfo;
...@@ -78,6 +80,7 @@ typedef struct _tableInfo { ...@@ -78,6 +80,7 @@ typedef struct _tableInfo {
not have the same order of attributes as not have the same order of attributes as
the POSTQUEL tables */ the POSTQUEL tables */
int *attlen; /* attribute lengths */ int *attlen; /* attribute lengths */
char* usename;
} TableInfo; } TableInfo;
...@@ -108,6 +111,7 @@ typedef struct _aggInfo { ...@@ -108,6 +111,7 @@ typedef struct _aggInfo {
char *aggtranstype2; char *aggtranstype2;
char *agginitval1; char *agginitval1;
char *agginitval2; char *agginitval2;
char* usename;
} AggInfo; } AggInfo;
typedef struct _oprInfo { typedef struct _oprInfo {
...@@ -126,6 +130,7 @@ typedef struct _oprInfo { ...@@ -126,6 +130,7 @@ typedef struct _oprInfo {
char *oprcanhash; /* can we use hash join strategy ? */ char *oprcanhash; /* can we use hash join strategy ? */
char *oprlsortop; /* oid's of the left and right sort operators */ char *oprlsortop; /* oid's of the left and right sort operators */
char *oprrsortop; char *oprrsortop;
char* usename;
} OprInfo; } OprInfo;
......
...@@ -44,12 +44,11 @@ echo "${BS}." ...@@ -44,12 +44,11 @@ echo "${BS}."
psql -l -A -q -t| tr '|' ' ' | grep -v '^template1 ' | \ psql -l -A -q -t| tr '|' ' ' | grep -v '^template1 ' | \
while read DATABASE PGUSERID DATAPATH while read DATABASE PGUSERID DATAPATH
do do
POSTGRES_USER="`psql -A -q -t template1 <<END POSTGRES_USER="`echo \" \
select usename select usename \
from pg_user from pg_user \
where usesysid = $PGUSERID; where usesysid = $PGUSERID; \" | \
END`" psql -A -q -t template1`"
echo "${BS}connect template1 $POSTGRES_USER" echo "${BS}connect template1 $POSTGRES_USER"
echo "create database $DATABASE;" echo "create database $DATABASE;"
echo "${BS}connect $DATABASE $POSTGRES_USER" echo "${BS}connect $DATABASE $POSTGRES_USER"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment