Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f198f0a

Browse files
committed
pg_dump: Remove some dead code
Client-side tracking of atttypmod has been unused since 64f3524, when server-side format_type() started being used exclusively. So remove this 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 parent 8bf5af2 commit f198f0a

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

src/bin/pg_dump/pg_dump.c

-5
Original file line numberDiff line numberDiff line change
@@ -8182,7 +8182,6 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables)
81828182
int i_attnum;
81838183
int i_attname;
81848184
int i_atttypname;
8185-
int i_atttypmod;
81868185
int i_attstattarget;
81878186
int i_attstorage;
81888187
int i_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

-1
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,6 @@ typedef struct _tableInfo
326326
int numatts; /* 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)