Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
3d97a61a
Commit
3d97a61a
authored
28 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
Added pg_dumpall to source tree.
parent
3a02ccfa
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/bin/pg_dump/Makefile
+2
-1
2 additions, 1 deletion
src/bin/pg_dump/Makefile
src/bin/pg_dump/pg_dumpall
+36
-0
36 additions, 0 deletions
src/bin/pg_dump/pg_dumpall
src/man/pg_dumpall.1
+17
-0
17 additions, 0 deletions
src/man/pg_dumpall.1
with
55 additions
and
1 deletion
src/bin/pg_dump/Makefile
+
2
−
1
View file @
3d97a61a
...
...
@@ -7,7 +7,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.1
1
199
6/11/28 03:31:27 bry
an
h
Exp $
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.1
2
199
7/01/16 15:28:21 momji
an Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -35,6 +35,7 @@ submake:
install
:
pg_dump
$(
INSTALL
)
$(
INSTL_EXE_OPTS
)
pg_dump
$(
DESTDIR
)$(
BINDIR
)
/pg_dump
$(
INSTALL
)
$(
INSTL_EXE_OPTS
)
pg_dumpall
$(
DESTDIR
)$(
BINDIR
)
/pg_dumpall
depend dep
:
$(
CC
)
-MM
$(
INCLUDE_OPT
)
*
.c
>
depend
...
...
This diff is collapsed.
Click to expand it.
src/bin/pg_dump/pg_dumpall
0 → 100644
+
36
−
0
View file @
3d97a61a
#!/bin/sh
#
# pg_dumpall [pg_dump parameters]
# dumps all databases to standard output
# It also dumps the pg_user table
#
psql
-l
-A
-q
-t
|unesc|cut
-d
"|"
-f1
|
grep
-v
'^template1$'
|
\
while
read
DATABASE
do
/bin/echo
'\connect template1'
/bin/echo
"create database
$DATABASE
;"
/bin/echo
'\connect'
"
$DATABASE
"
pg_dump
"
$@
"
$DATABASE
done
/bin/echo
'\connect template1'
/bin/echo
'copy pg_user from stdin;'
#
# Dump everyone but the postgres user
# initdb creates him
#
POSTGRES_SUPER_USER_ID
=
"
`
psql
-q
template1
<<
END
\\
t
select datdba
from pg_database
where datname = 'template1';
END`"
psql -q template1 <<END
select pg_user.* into table tmp_pg_user
from pg_user
where usesysid <>
$POSTGRES_SUPER_USER_ID
;
copy tmp_pg_user to stdout;
drop table tmp_pg_user;
END
/bin/echo
'\.'
This diff is collapsed.
Click to expand it.
src/man/pg_dumpall.1
0 → 100644
+
17
−
0
View file @
3d97a61a
.\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here....
.\" $Header: /cvsroot/pgsql/src/man/Attic/pg_dumpall.1,v 1.1 1997/01/16 15:28:34 momjian Exp $
.TH pg_dumpall UNIX 1/20/96 PostgreSQL PostgreSQL
.SH NAME
pg_dumpall \(em dumps out all Postgres databases into a script file
.SH SYNOPSIS
.BR pg_dumpall
[pg_dump options]
.SH DESCRIPTION
.IR "pg_dumpall"
is a utility for dumping out all Postgres databases into one file.
It also dumps the pg_user table, which is global to all databases.
pg_dumpall takes all pg_dump options, but \fB-f\fR and \fBdbname\fR
should not be used.
.SH "SEE ALSO"
pg_dump(1)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment