|
21 | 21 | *
|
22 | 22 | *
|
23 | 23 | * IDENTIFICATION
|
24 |
| - * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.62 1998/01/30 15:03:35 scrappy Exp $ |
| 24 | + * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.63 1998/02/18 15:33:37 momjian Exp $ |
25 | 25 | *
|
26 | 26 | * Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
|
27 | 27 | *
|
|
55 | 55 | #include <unistd.h> /* for getopt() */
|
56 | 56 | #include <stdio.h>
|
57 | 57 | #include <string.h>
|
| 58 | +#include <ctype.h> |
58 | 59 | #include <sys/param.h> /* for MAXHOSTNAMELEN on most */
|
59 | 60 | #ifdef sparc_solaris
|
60 | 61 | #include <netdb.h> /* for MAXHOSTNAMELEN on some */
|
@@ -119,7 +120,7 @@ static void
|
119 | 120 | usage(const char *progname)
|
120 | 121 | {
|
121 | 122 | fprintf(stderr,
|
122 |
| - "usage: %s [options] [dbname]\n", progname); |
| 123 | + "usage: %s [options] dbname\n", progname); |
123 | 124 | fprintf(stderr,
|
124 | 125 | "\t -a \t\t dump out only the data, no schema\n");
|
125 | 126 | fprintf(stderr,
|
@@ -531,7 +532,7 @@ main(int argc, char **argv)
|
531 | 532 | const char *dbname = NULL;
|
532 | 533 | const char *pghost = NULL;
|
533 | 534 | const char *pgport = NULL;
|
534 |
| - const char *tablename = NULL; |
| 535 | + char *tablename = NULL; |
535 | 536 | int oids = 0,
|
536 | 537 | acls = 0;
|
537 | 538 | TableInfo *tblinfo;
|
@@ -583,7 +584,14 @@ main(int argc, char **argv)
|
583 | 584 | schemaOnly = 1;
|
584 | 585 | break;
|
585 | 586 | case 't': /* Dump data for this table only */
|
586 |
| - tablename = optarg; |
| 587 | + { |
| 588 | + int i; |
| 589 | + |
| 590 | + tablename = strdup(optarg); |
| 591 | + for (i = 0; tablename[i]; i++) |
| 592 | + if (isupper(tablename[i])) |
| 593 | + tablename[i] = tolower(tablename[i]); |
| 594 | + } |
587 | 595 | break;
|
588 | 596 | case 'v': /* verbose */
|
589 | 597 | g_verbose = true;
|
|
0 commit comments