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

Commit2ed7b03

Browse files
committed
Fix -t for pg_dump when table is uppercase.
1 parente0aab4a commit2ed7b03

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

‎src/bin/pg_dump/pg_dump.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*
2222
*
2323
* 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 $
2525
*
2626
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
2727
*
@@ -55,6 +55,7 @@
5555
#include<unistd.h>/* for getopt() */
5656
#include<stdio.h>
5757
#include<string.h>
58+
#include<ctype.h>
5859
#include<sys/param.h>/* for MAXHOSTNAMELEN on most */
5960
#ifdefsparc_solaris
6061
#include<netdb.h>/* for MAXHOSTNAMELEN on some */
@@ -119,7 +120,7 @@ static void
119120
usage(constchar*progname)
120121
{
121122
fprintf(stderr,
122-
"usage: %s [options][dbname]\n",progname);
123+
"usage: %s [options] dbname\n",progname);
123124
fprintf(stderr,
124125
"\t -a \t\t dump out only the data, no schema\n");
125126
fprintf(stderr,
@@ -531,7 +532,7 @@ main(int argc, char **argv)
531532
constchar*dbname=NULL;
532533
constchar*pghost=NULL;
533534
constchar*pgport=NULL;
534-
constchar*tablename=NULL;
535+
char*tablename=NULL;
535536
intoids=0,
536537
acls=0;
537538
TableInfo*tblinfo;
@@ -583,7 +584,14 @@ main(int argc, char **argv)
583584
schemaOnly=1;
584585
break;
585586
case't':/* Dump data for this table only */
586-
tablename=optarg;
587+
{
588+
inti;
589+
590+
tablename=strdup(optarg);
591+
for (i=0;tablename[i];i++)
592+
if (isupper(tablename[i]))
593+
tablename[i]=tolower(tablename[i]);
594+
}
587595
break;
588596
case'v':/* verbose */
589597
g_verbose= true;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp