git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8bf5af2)
pg_dump: Remove some dead code
2023年2月22日 07:21:16 +0000 (08:21 +0100)
2023年2月22日 07:23:56 +0000 (08:23 +0100)
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


diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 527c7651ab24a306c4518ef97aa4c96152d12e92..1a06eeaf6aa17ea6cc7458c7c3fd3166497aeb5c 100644 (file)
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -8182,7 +8182,6 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables)
int i_attnum;
int i_attname;
int i_atttypname;
- int i_atttypmod;
int i_attstattarget;
int i_attstorage;
int i_typstorage;
@@ -8252,7 +8251,6 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables)
"a.attrelid,\n"
"a.attnum,\n"
"a.attname,\n"
- "a.atttypmod,\n"
"a.attstattarget,\n"
"a.attstorage,\n"
"t.typstorage,\n"
@@ -8320,7 +8318,6 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables)
i_attnum = PQfnumber(res, "attnum");
i_attname = PQfnumber(res, "attname");
i_atttypname = PQfnumber(res, "atttypname");
- i_atttypmod = PQfnumber(res, "atttypmod");
i_attstattarget = PQfnumber(res, "attstattarget");
i_attstorage = PQfnumber(res, "attstorage");
i_typstorage = PQfnumber(res, "typstorage");
@@ -8381,7 +8378,6 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables)
tbinfo->numatts = numatts;
tbinfo->attnames = (char **) pg_malloc(numatts * sizeof(char *));
tbinfo->atttypnames = (char **) pg_malloc(numatts * sizeof(char *));
- tbinfo->atttypmod = (int *) pg_malloc(numatts * sizeof(int));
tbinfo->attstattarget = (int *) pg_malloc(numatts * sizeof(int));
tbinfo->attstorage = (char *) pg_malloc(numatts * sizeof(char));
tbinfo->typstorage = (char *) pg_malloc(numatts * sizeof(char));
@@ -8408,7 +8404,6 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables)
tbinfo->dobj.name);
tbinfo->attnames[j] = pg_strdup(PQgetvalue(res, r, i_attname));
tbinfo->atttypnames[j] = pg_strdup(PQgetvalue(res, r, i_atttypname));
- tbinfo->atttypmod[j] = atoi(PQgetvalue(res, r, i_atttypmod));
tbinfo->attstattarget[j] = atoi(PQgetvalue(res, r, i_attstattarget));
tbinfo->attstorage[j] = *(PQgetvalue(res, r, i_attstorage));
tbinfo->typstorage[j] = *(PQgetvalue(res, r, i_typstorage));
diff --git a/src/bin/pg_dump/pg_dump.h b/src/bin/pg_dump/pg_dump.h
index e7cbd8d7ed7867d47bb2c25c75a36573333f2852..cdca0b993dfd097c94472b9487b66aa39ea2f333 100644 (file)
--- a/src/bin/pg_dump/pg_dump.h
+++ b/src/bin/pg_dump/pg_dump.h
@@ -326,7 +326,6 @@ typedef struct _tableInfo
int numatts; /* number of attributes */
char **attnames; /* the attribute names */
char **atttypnames; /* attribute type names */
- int *atttypmod; /* type-specific type modifiers */
int *attstattarget; /* attribute statistics targets */
char *attstorage; /* attribute storage scheme */
char *typstorage; /* type storage scheme */
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /