Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
ca1a20eb
Commit
ca1a20eb
authored
Nov 17, 1996
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for -da option of pg_dump.
parent
cc7f0322
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
17 deletions
+14
-17
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.c
+9
-9
src/man/pg_dump.1
src/man/pg_dump.1
+5
-8
No files found.
src/bin/pg_dump/pg_dump.c
View file @
ca1a20eb
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.1
4 1996/11/10 01:35:39 bryanh
Exp $
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.1
5 1996/11/17 04:56:01 momjian
Exp $
*
*
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
*
*
...
@@ -84,18 +84,15 @@ usage(const char* progname)
...
@@ -84,18 +84,15 @@ usage(const char* progname)
fprintf
(
stderr
,
"
\t
-H hostname
\t\t
server host name
\n
"
);
fprintf
(
stderr
,
"
\t
-H hostname
\t\t
server host name
\n
"
);
fprintf
(
stderr
,
"
\t
-p port
\t\t
server port number
\n
"
);
fprintf
(
stderr
,
"
\t
-p port
\t\t
server port number
\n
"
);
fprintf
(
stderr
,
"
\t
-v
\t\t
verbose
\n
"
);
fprintf
(
stderr
,
"
\t
-v
\t\t
verbose
\n
"
);
fprintf
(
stderr
,
"
\t
-d
[a]
\t\t
dump data as proper insert strings
\n
"
);
fprintf
(
stderr
,
"
\t
-d
\t\t
dump data as proper insert strings
\n
"
);
fprintf
(
stderr
,
"
\t
\t\t
(if 'a' then attribute names also)
\n
"
);
fprintf
(
stderr
,
"
\t
-D
\t\t
dump data as inserts with attribute names
\n
"
);
fprintf
(
stderr
,
"
\t
-S
\t\t
dump out only the schema, no data
\n
"
);
fprintf
(
stderr
,
"
\t
-S
\t\t
dump out only the schema, no data
\n
"
);
fprintf
(
stderr
,
"
\t
-a
\t\t
dump out only the data, no schema
\n
"
);
fprintf
(
stderr
,
"
\t
-a
\t\t
dump out only the data, no schema
\n
"
);
fprintf
(
stderr
,
"
\t
-t table
\t\t
dump for this table only
\n
"
);
fprintf
(
stderr
,
"
\t
-t table
\t\t
dump for this table only
\n
"
);
fprintf
(
stderr
,
"
\t
-o
\t\t
dump object id's (oids)
\n
"
);
fprintf
(
stderr
,
"
\t
-o
\t\t
dump object id's (oids)
\n
"
);
fprintf
(
stderr
,
"
\n
if dbname is not supplied, then the DATABASE environment name is used
\n
"
);
fprintf
(
stderr
,
"
\n
If dbname is not supplied, then the DATABASE environment name is used.
\n
"
);
fprintf
(
stderr
,
"
\n
"
);
fprintf
(
stderr
,
"
\n
"
);
fprintf
(
stderr
,
"
\t
pg_dump dumps out postgres databases and produces a script file
\n
"
);
fprintf
(
stderr
,
"
\t
of SQL commands to regenerate the schema
\n
"
);
fprintf
(
stderr
,
"
\t
The SQL output is designed for import into Postgres95
\n
"
);
exit
(
1
);
exit
(
1
);
}
}
...
@@ -137,7 +134,7 @@ main(int argc, char** argv)
...
@@ -137,7 +134,7 @@ main(int argc, char** argv)
progname
=
*
argv
;
progname
=
*
argv
;
while
((
c
=
getopt
(
argc
,
argv
,
"f:H:p:t:vSDd
:
ao"
))
!=
EOF
)
{
while
((
c
=
getopt
(
argc
,
argv
,
"f:H:p:t:vSDd
D
ao"
))
!=
EOF
)
{
switch
(
c
)
{
switch
(
c
)
{
case
'f'
:
/* output file name */
case
'f'
:
/* output file name */
filename
=
optarg
;
filename
=
optarg
;
...
@@ -156,7 +153,10 @@ main(int argc, char** argv)
...
@@ -156,7 +153,10 @@ main(int argc, char** argv)
break
;
break
;
case
'd'
:
/* dump data as proper insert strings */
case
'd'
:
/* dump data as proper insert strings */
dumpData
=
1
;
dumpData
=
1
;
attrNames
=
strstr
(
optarg
,
"a"
)
?
1
:
0
;
break
;
case
'D'
:
/* dump data as proper insert strings with attr names */
dumpData
=
1
;
attrNames
=
1
;
break
;
break
;
case
't'
:
/* Dump data for this table only */
case
't'
:
/* Dump data for this table only */
tablename
=
optarg
;
tablename
=
optarg
;
...
...
src/man/pg_dump.1
View file @
ca1a20eb
.\" This is -*-nroff-*-
.\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here....
.\" XXX standard disclaimer belongs here....
.\" $Header: /cvsroot/pgsql/src/man/Attic/pg_dump.1,v 1.
1 1996/11/14 10:17:42 scrappy
Exp $
.\" $Header: /cvsroot/pgsql/src/man/Attic/pg_dump.1,v 1.
2 1996/11/17 04:56:16 momjian
Exp $
.TH PG_DUMP UNIX 1/20/96 Postgres95 Postgres95
.TH PG_DUMP UNIX 1/20/96 Postgres95 Postgres95
.SH NAME
.SH NAME
pg_dump \(em dumps out a Postgres database into a script file
pg_dump \(em dumps out a Postgres database into a script file
...
@@ -21,7 +21,10 @@ port]
...
@@ -21,7 +21,10 @@ port]
.BR "-v"
.BR "-v"
]
]
[\c
[\c
.BR "-d[a]"
.BR "-d"
]
[\c
.BR "-D"
]
]
[\c
[\c
.BR "-S"
.BR "-S"
...
@@ -75,11 +78,5 @@ the same as above. Partial index predicates are stored as plans)
...
@@ -75,11 +78,5 @@ the same as above. Partial index predicates are stored as plans)
.BR "large objects"
.BR "large objects"
pg_dump does not handle large objects. Large objects are ignored and
pg_dump does not handle large objects. Large objects are ignored and
must be dealt with manually.
must be dealt with manually.
.TP
.BR "oid preservation"
pg_dump does not preserve oid's while dumping. If you have
stored oid's explicitly in tables in user-defined attributes,
and are using them as keys, then the output scripts will not
regenerate your database correctly.
.SH "SEE ALSO"
.SH "SEE ALSO"
copy(l)
copy(l)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment