Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita53d854

Browse files
committed
pg_dump, pg_dumpall cleanups.
1 parent374b000 commita53d854

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

‎src/bin/pg_dump/pg_dump.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Copyright (c) 1994, Regents of the University of California
77
*
8-
* $Id: pg_dump.h,v 1.15 1997/06/02 02:52:06 scrappy Exp $
8+
* $Id: pg_dump.h,v 1.16 1997/06/21 16:08:15 momjian Exp $
99
*
1010
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
1111
*
@@ -38,6 +38,7 @@ typedef struct _typeInfo {
3838
char*typdelim;
3939
char*typdefault;
4040
char*typrelid;
41+
char*usename;
4142
intpassedbyvalue;
4243
intisArray;
4344
}TypeInfo;
@@ -53,6 +54,7 @@ typedef struct _funcInfo {
5354
intretset;/* 1 if the function returns a set, 0 otherwise */
5455
char*prosrc;
5556
char*probin;
57+
char*usename;
5658
intdumped;/* 1 if already dumped */
5759
}FuncInfo;
5860

@@ -78,6 +80,7 @@ typedef struct _tableInfo {
7880
not have the same order of attributes as
7981
the POSTQUEL tables */
8082
int*attlen;/* attribute lengths */
83+
char*usename;
8184

8285
}TableInfo;
8386

@@ -108,6 +111,7 @@ typedef struct _aggInfo {
108111
char*aggtranstype2;
109112
char*agginitval1;
110113
char*agginitval2;
114+
char*usename;
111115
}AggInfo;
112116

113117
typedefstruct_oprInfo {
@@ -126,6 +130,7 @@ typedef struct _oprInfo {
126130
char*oprcanhash;/* can we use hash join strategy ? */
127131
char*oprlsortop;/* oid's of the left and right sort operators */
128132
char*oprrsortop;
133+
char*usename;
129134
}OprInfo;
130135

131136

‎src/bin/pg_dump/pg_dumpall

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,11 @@ echo "${BS}."
4444
psql -l -A -q -t| tr '|' ' ' | grep -v '^template1 ' |\
4545
while read DATABASE PGUSERID DATAPATH
4646
do
47-
POSTGRES_USER="`psql -A -q -t template1 <<END
48-
select usename
49-
from pg_user
50-
where usesysid =$PGUSERID;
51-
END`"
52-
47+
POSTGRES_USER="`echo \"\
48+
select usename\
49+
from pg_user\
50+
where usesysid =$PGUSERID; \" |\
51+
psql -A -q -t template1`"
5352
echo"${BS}connect template1$POSTGRES_USER"
5453
echo"create database$DATABASE;"
5554
echo"${BS}connect$DATABASE$POSTGRES_USER"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp