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

Commitf198f0a

Browse files
committed
pg_dump: Remove some dead code
Client-side tracking of atttypmod has been unused since64f3524, whenserver-side format_type() started being used exclusively. So removethis dead code.Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>Discussion:https://www.postgresql.org/message-id/flat/144be239-c893-9361-704f-ac85b5b98d1a%40enterprisedb.com
1 parent8bf5af2 commitf198f0a

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

‎src/bin/pg_dump/pg_dump.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8182,7 +8182,6 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables)
81828182
inti_attnum;
81838183
inti_attname;
81848184
inti_atttypname;
8185-
inti_atttypmod;
81868185
inti_attstattarget;
81878186
inti_attstorage;
81888187
inti_typstorage;
@@ -8252,7 +8251,6 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables)
82528251
"a.attrelid,\n"
82538252
"a.attnum,\n"
82548253
"a.attname,\n"
8255-
"a.atttypmod,\n"
82568254
"a.attstattarget,\n"
82578255
"a.attstorage,\n"
82588256
"t.typstorage,\n"
@@ -8320,7 +8318,6 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables)
83208318
i_attnum = PQfnumber(res, "attnum");
83218319
i_attname = PQfnumber(res, "attname");
83228320
i_atttypname = PQfnumber(res, "atttypname");
8323-
i_atttypmod = PQfnumber(res, "atttypmod");
83248321
i_attstattarget = PQfnumber(res, "attstattarget");
83258322
i_attstorage = PQfnumber(res, "attstorage");
83268323
i_typstorage = PQfnumber(res, "typstorage");
@@ -8381,7 +8378,6 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables)
83818378
tbinfo->numatts = numatts;
83828379
tbinfo->attnames = (char **) pg_malloc(numatts * sizeof(char *));
83838380
tbinfo->atttypnames = (char **) pg_malloc(numatts * sizeof(char *));
8384-
tbinfo->atttypmod = (int *) pg_malloc(numatts * sizeof(int));
83858381
tbinfo->attstattarget = (int *) pg_malloc(numatts * sizeof(int));
83868382
tbinfo->attstorage = (char *) pg_malloc(numatts * sizeof(char));
83878383
tbinfo->typstorage = (char *) pg_malloc(numatts * sizeof(char));
@@ -8408,7 +8404,6 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables)
84088404
tbinfo->dobj.name);
84098405
tbinfo->attnames[j] = pg_strdup(PQgetvalue(res, r, i_attname));
84108406
tbinfo->atttypnames[j] = pg_strdup(PQgetvalue(res, r, i_atttypname));
8411-
tbinfo->atttypmod[j] = atoi(PQgetvalue(res, r, i_atttypmod));
84128407
tbinfo->attstattarget[j] = atoi(PQgetvalue(res, r, i_attstattarget));
84138408
tbinfo->attstorage[j] = *(PQgetvalue(res, r, i_attstorage));
84148409
tbinfo->typstorage[j] = *(PQgetvalue(res, r, i_typstorage));

‎src/bin/pg_dump/pg_dump.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,6 @@ typedef struct _tableInfo
326326
intnumatts;/* number of attributes */
327327
char**attnames;/* the attribute names */
328328
char**atttypnames;/* attribute type names */
329-
int*atttypmod;/* type-specific type modifiers */
330329
int*attstattarget;/* attribute statistics targets */
331330
char*attstorage;/* attribute storage scheme */
332331
char*typstorage;/* type storage scheme */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp