20
20
*
21
21
*
22
22
* IDENTIFICATION
23
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.14 1996/11/10 01:35:39 bryanh Exp $
23
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.15 1996/11/17 04:56:01 momjian Exp $
24
24
*
25
25
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
26
26
*
@@ -84,18 +84,15 @@ usage(const char* progname)
84
84
fprintf (stderr ,"\t -H hostname \t\t server host name\n" );
85
85
fprintf (stderr ,"\t -p port \t\t server port number\n" );
86
86
fprintf (stderr ,"\t -v \t\t verbose\n" );
87
- fprintf (stderr ,"\t -d[a] \t\t dump data as proper insert strings\n" );
88
- fprintf (stderr ,"\t \t\t(if 'a' then attribute names also) \n" );
87
+ fprintf (stderr ,"\t -d \t\t dump data as proper insert strings\n" );
88
+ fprintf (stderr ,"\t-D \t\tdump data as inserts with attribute names\n" );
89
89
fprintf (stderr ,"\t -S \t\t dump out only the schema, no data\n" );
90
90
fprintf (stderr ,"\t -a \t\t dump out only the data, no schema\n" );
91
91
fprintf (stderr ,"\t -t table \t\t dump for this table only\n" );
92
92
fprintf (stderr ,"\t -o \t\t dump object id's (oids)\n" );
93
- fprintf (stderr ,"\n if dbname is not supplied, then the DATABASE environment name is used\n" );
93
+ fprintf (stderr ,"\nIf dbname is not supplied, then the DATABASE environment name is used. \n" );
94
94
fprintf (stderr ,"\n" );
95
95
96
- fprintf (stderr ,"\tpg_dump dumps out postgres databases and produces a script file\n" );
97
- fprintf (stderr ,"\tof SQL commands to regenerate the schema\n" );
98
- fprintf (stderr ,"\tThe SQL output is designed for import into Postgres95\n" );
99
96
exit (1 );
100
97
}
101
98
@@ -137,7 +134,7 @@ main(int argc, char** argv)
137
134
138
135
progname = * argv ;
139
136
140
- while ((c = getopt (argc ,argv ,"f:H:p:t:vSDd:ao " ))!= EOF ) {
137
+ while ((c = getopt (argc ,argv ,"f:H:p:t:vSDdDao " ))!= EOF ) {
141
138
switch (c ) {
142
139
case 'f' :/* output file name */
143
140
filename = optarg ;
@@ -156,7 +153,10 @@ main(int argc, char** argv)
156
153
break ;
157
154
case 'd' :/* dump data as proper insert strings */
158
155
dumpData = 1 ;
159
- attrNames = strstr (optarg ,"a" ) ?1 :0 ;
156
+ break ;
157
+ case 'D' :/* dump data as proper insert strings with attr names */
158
+ dumpData = 1 ;
159
+ attrNames = 1 ;
160
160
break ;
161
161
case 't' :/* Dump data for this table only */
162
162
tablename = optarg ;