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

Commitcfeccdf

Browse files
committed
- Added CVS headers to files
- Avoid forcing table name to lower case in FixupBlobXrefs - Removed fmtId calls for all ArchiveEntry name fields. This fixes quoting problems in trigger enable/disable code for mixed case table names, and avoids commands like 'pg_restore -t '"TblA"'
1 parent31b5c05 commitcfeccdf

12 files changed

+55
-34
lines changed

‎src/bin/pg_dump/pg_backup.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*
1616
*
1717
* IDENTIFICATION
18+
*$Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup.h,v 1.8 2001/03/19 02:35:28 pjw Exp $
1819
*
1920
* Modifications - 28-Jun-2000 - pjw@rhyme.com.au
2021
*

‎src/bin/pg_dump/pg_backup_archiver.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*
1616
*
1717
* IDENTIFICATION
18+
*$Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.21 2001/03/19 02:35:28 pjw Exp $
1819
*
1920
* Modifications - 28-Jun-2000 - pjw@rhyme.com.au
2021
*
@@ -186,7 +187,7 @@ void RestoreArchive(Archive* AHX, RestoreOptions *ropt)
186187
if (impliedDataOnly)
187188
{
188189
ropt->dataOnly=impliedDataOnly;
189-
ahlog(AH,1,"Implied data-only restore\n",te->desc,te->name);
190+
ahlog(AH,1,"Implied data-only restore\n");
190191
}
191192
}
192193

‎src/bin/pg_dump/pg_backup_archiver.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
*
1818
*
1919
* IDENTIFICATION
20+
*$Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.h,v 1.26 2001/03/19 02:35:28 pjw Exp $
2021
*
2122
* Modifications - 28-Jun-2000 - pjw@rhyme.com.au
2223
*
@@ -62,7 +63,7 @@ typedef z_stream *z_streamp;
6263

6364
#defineK_VERS_MAJOR 1
6465
#defineK_VERS_MINOR 4
65-
#defineK_VERS_REV29
66+
#defineK_VERS_REV30
6667

6768
/* Data block types */
6869
#defineBLK_DATA 1

‎src/bin/pg_dump/pg_backup_custom.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
*
2020
*
2121
* IDENTIFICATION
22+
*$Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_custom.c,v 1.8 2001/03/19 02:35:28 pjw Exp $
2223
*
2324
* Modifications - 28-Jun-2000 - pjw@rhyme.com.au
2425
*

‎src/bin/pg_dump/pg_backup_db.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,18 @@
55
* Implements the basic DB functions used by the archiver.
66
*
77
* IDENTIFICATION
8+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_db.c,v 1.15 2001/03/19 02:35:28 pjw Exp $
9+
*
10+
* NOTES
811
*
912
* Modifications - 04-Jan-2001 - pjw@rhyme.com.au
1013
*
1114
* - Check results of PQ routines more carefully.
1215
*
16+
* Modifications - 19-Mar-2001 - pjw@rhyme.com.au
17+
*
18+
* - Avoid forcing table name to lower case in FixupBlobXrefs!
19+
*
1320
*-------------------------------------------------------------------------
1421
*/
1522

@@ -583,9 +590,6 @@ void FixupBlobRefs(ArchiveHandle *AH, char *tablename)
583590
inti,n;
584591
char*attr;
585592

586-
for(i=0 ;i<strlen(tablename) ;i++)
587-
tablename[i]=tolower((unsignedchar)tablename[i]);
588-
589593
if (strcmp(tablename,BLOB_XREF_TABLE)==0)
590594
return;
591595

‎src/bin/pg_dump/pg_backup_db.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/*
22
*Definitions for pg_backup_db.c
33
*
4+
*IDENTIFICATION
5+
*$Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_db.h,v 1.3 2001/03/19 02:35:28 pjw Exp $
46
*/
57

68
#defineBLOB_XREF_TABLE "dump_blob_xref"/* MUST be lower case */

‎src/bin/pg_dump/pg_backup_files.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
*
2121
*
2222
* IDENTIFICATION
23+
*$Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_files.c,v 1.7 2001/03/19 02:35:28 pjw Exp $
2324
*
2425
* Modifications - 28-Jun-2000 - pjw@rhyme.com.au
2526
*

‎src/bin/pg_dump/pg_backup_null.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
*
1818
*
1919
* IDENTIFICATION
20+
*$Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_null.c,v 1.4 2001/03/19 02:35:28 pjw Exp $
2021
*
2122
* Modifications - 09-Jul-2000 - pjw@rhyme.com.au
2223
*

‎src/bin/pg_dump/pg_backup_tar.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*
1717
*
1818
* IDENTIFICATION
19+
*$Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_tar.c,v 1.11 2001/03/19 02:35:28 pjw Exp $
1920
*
2021
* Modifications - 28-Jun-2000 - pjw@rhyme.com.au
2122
*

‎src/bin/pg_dump/pg_backup_tar.h

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
1-
/* Header
2-
Offset Length Contents
3-
0 100 bytes File name ('\0' terminated, 99 maxmum length)
4-
100 8 bytes File mode (in octal ascii)
5-
108 8 bytes User ID (in octal ascii)
6-
116 8 bytes Group ID (in octal ascii)
7-
124 12 bytes File size (s) (in octal ascii)
8-
136 12 bytes Modify time (in octal ascii)
9-
148 8 bytes Header checksum (in octal ascii)
10-
156 1 bytes Link flag
11-
157 100 bytes Linkname ('\0' terminated, 99 maxmum length)
12-
257 8 bytes Magic ("ustar \0")
13-
265 32 bytes User name ('\0' terminated, 31 maxmum length)
14-
297 32 bytes Group name ('\0' terminated, 31 maxmum length)
15-
329 8 bytes Major device ID (in octal ascii)
16-
337 8 bytes Minor device ID (in octal ascii)
17-
345 167 bytes Padding
18-
512 (s+p)bytes File contents (s+p) := (((s) + 511) & ~511), round up to 512 bytes
19-
*/
20-
21-
22-
1+
/*
2+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_tar.h,v 1.2 2001/03/19 02:35:29 pjw Exp $
3+
*
4+
* TAR Header
5+
*
6+
* Offset Length Contents
7+
* 0 100 bytes File name ('\0' terminated, 99 maxmum length)
8+
* 100 8 bytes File mode (in octal ascii)
9+
* 108 8 bytes User ID (in octal ascii)
10+
* 116 8 bytes Group ID (in octal ascii)
11+
* 124 12 bytes File size (s) (in octal ascii)
12+
* 136 12 bytes Modify time (in octal ascii)
13+
* 148 8 bytes Header checksum (in octal ascii)
14+
* 156 1 bytes Link flag
15+
* 157 100 bytes Linkname ('\0' terminated, 99 maxmum length)
16+
* 257 8 bytes Magic ("ustar \0")
17+
* 265 32 bytes User name ('\0' terminated, 31 maxmum length)
18+
* 297 32 bytes Group name ('\0' terminated, 31 maxmum length)
19+
* 329 8 bytes Major device ID (in octal ascii)
20+
* 337 8 bytes Minor device ID (in octal ascii)
21+
* 345 167 bytes Padding
22+
* 512 (s+p)bytes File contents (s+p) := (((s) + 511) & ~511), round up to 512 bytes
23+
*/
2324

2425
/* The linkflag defines the type of file */
2526
#defineLF_OLDNORMAL '\0'/* Normal disk file, Unix compatible */

‎src/bin/pg_dump/pg_dump.c

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*
2323
*
2424
* IDENTIFICATION
25-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.194 2001/03/06 04:53:28 pjw Exp $
25+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.195 2001/03/19 02:35:29 pjw Exp $
2626
*
2727
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
2828
*
@@ -108,7 +108,13 @@
108108
* I opted for encoding them except in procedure bodies.
109109
* - Dump relevant parts of sequences only when doing schemaOnly & dataOnly
110110
* - Prevent double-dumping of sequences when dataOnly.
111-
*
111+
*
112+
* Modifications - 19-Mar-2001 - pjw@rhyme.com.au
113+
*
114+
* - Remove fmtId calls for all ArchiveEntry name fields. This fixes
115+
*quoting problems in trigger enable/disable code for mixed case
116+
*table names, and avoids commands like 'pg_restore -t '"TblA"''
117+
*
112118
*-------------------------------------------------------------------------
113119
*/
114120

@@ -649,7 +655,7 @@ dumpClasses(const TableInfo *tblinfo, const int numTables, Archive *fout,
649655
copyStmt=NULL;
650656
}
651657

652-
ArchiveEntry(fout,tblinfo[i].oid,fmtId(tblinfo[i].relname, false),
658+
ArchiveEntry(fout,tblinfo[i].oid,tblinfo[i].relname,
653659
"TABLE DATA",NULL,"","",copyStmt,tblinfo[i].usename,
654660
dumpFn,dumpCtx);
655661
}
@@ -2972,7 +2978,7 @@ dumpTypes(Archive *fout, FuncInfo *finfo, int numFuncs,
29722978
else
29732979
appendPQExpBuffer(q,");\n");
29742980

2975-
ArchiveEntry(fout,tinfo[i].oid,fmtId(tinfo[i].typname,force_quotes),"TYPE",NULL,
2981+
ArchiveEntry(fout,tinfo[i].oid,tinfo[i].typname,"TYPE",NULL,
29762982
q->data,delq->data,"",tinfo[i].usename,NULL,NULL);
29772983

29782984
/*** Dump Type Comments ***/
@@ -3841,7 +3847,7 @@ dumpTables(Archive *fout, TableInfo *tblinfo, int numTables,
38413847

38423848
if (!dataOnly) {
38433849

3844-
ArchiveEntry(fout,tblinfo[i].oid,fmtId(tblinfo[i].relname, false),
3850+
ArchiveEntry(fout,tblinfo[i].oid,tblinfo[i].relname,
38453851
reltypename,NULL,q->data,delq->data,"",tblinfo[i].usename,
38463852
NULL,NULL);
38473853

@@ -4374,7 +4380,7 @@ dumpSequence(Archive *fout, TableInfo tbinfo, const bool schemaOnly, const bool
43744380
incby,maxv,minv,cache,
43754381
(cycled=='t') ?"cycle" :"");
43764382

4377-
ArchiveEntry(fout,tbinfo.oid,fmtId(tbinfo.relname,force_quotes),"SEQUENCE",NULL,
4383+
ArchiveEntry(fout,tbinfo.oid,tbinfo.relname,"SEQUENCE",NULL,
43784384
query->data,delqry->data,"",tbinfo.usename,NULL,NULL);
43794385
}
43804386

@@ -4385,7 +4391,7 @@ dumpSequence(Archive *fout, TableInfo tbinfo, const bool schemaOnly, const bool
43854391
formatStringLiteral(query,fmtId(tbinfo.relname,force_quotes),CONV_ALL);
43864392
appendPQExpBuffer(query,", %d, '%c');\n",last,called);
43874393

4388-
ArchiveEntry(fout,tbinfo.oid,fmtId(tbinfo.relname,force_quotes),"SEQUENCE SET",NULL,
4394+
ArchiveEntry(fout,tbinfo.oid,tbinfo.relname,"SEQUENCE SET",NULL,
43894395
query->data,""/* Del */,"","",NULL,NULL);
43904396
}
43914397

‎src/bin/pg_dump/pg_restore.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
*
3535
*
3636
* IDENTIFICATION
37+
*$Header: /cvsroot/pgsql/src/bin/pg_dump/pg_restore.c,v 1.18 2001/03/19 02:35:29 pjw Exp $
3738
*
3839
* Modifications - 28-Jun-2000 - pjw@rhyme.com.au
3940
*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp