From c0a3b211bcb790a8d76022cb2b3ffe9795aaf5e9 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 12 Oct 2016 15:11:31 -0400 Subject: [PATCH] pg_dump's getTypes() needn't retrieve typinput or typoutput anymore. Commit 64f3524e2 removed the stanza of code that examined these values. I failed to notice they were unnecessary because my compiler didn't warn about the un-read variables. Noted by Peter Eisentraut. --- src/bin/pg_dump/pg_dump.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index c821f3b0ee..28ec5bf383 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -3688,8 +3688,6 @@ getTypes(Archive *fout, int *numTypes) int i_inittypacl; int i_initrtypacl; int i_rolname; - int i_typinput; - int i_typoutput; int i_typelem; int i_typrelid; int i_typrelkind; @@ -3734,8 +3732,7 @@ getTypes(Archive *fout, int *numTypes) "%s AS inittypacl, " "%s AS initrtypacl, " "(%s t.typowner) AS rolname, " - "t.typinput::oid AS typinput, " - "t.typoutput::oid AS typoutput, t.typelem, t.typrelid, " + "t.typelem, t.typrelid, " "CASE WHEN t.typrelid = 0 THEN ' '::\"char\" " "ELSE (SELECT relkind FROM pg_class WHERE oid = t.typrelid) END AS typrelkind, " "t.typtype, t.typisdefined, " @@ -3763,8 +3760,7 @@ getTypes(Archive *fout, int *numTypes) "typnamespace, typacl, NULL as rtypacl, " "NULL AS inittypacl, NULL AS initrtypacl, " "(%s typowner) AS rolname, " - "typinput::oid AS typinput, " - "typoutput::oid AS typoutput, typelem, typrelid, " + "typelem, typrelid, " "CASE WHEN typrelid = 0 THEN ' '::\"char\" " "ELSE (SELECT relkind FROM pg_class WHERE oid = typrelid) END AS typrelkind, " "typtype, typisdefined, " @@ -3779,8 +3775,7 @@ getTypes(Archive *fout, int *numTypes) "typnamespace, NULL AS typacl, NULL as rtypacl, " "NULL AS inittypacl, NULL AS initrtypacl, " "(%s typowner) AS rolname, " - "typinput::oid AS typinput, " - "typoutput::oid AS typoutput, typelem, typrelid, " + "typelem, typrelid, " "CASE WHEN typrelid = 0 THEN ' '::\"char\" " "ELSE (SELECT relkind FROM pg_class WHERE oid = typrelid) END AS typrelkind, " "typtype, typisdefined, " @@ -3795,8 +3790,7 @@ getTypes(Archive *fout, int *numTypes) "typnamespace, NULL AS typacl, NULL as rtypacl, " "NULL AS inittypacl, NULL AS initrtypacl, " "(%s typowner) AS rolname, " - "typinput::oid AS typinput, " - "typoutput::oid AS typoutput, typelem, typrelid, " + "typelem, typrelid, " "CASE WHEN typrelid = 0 THEN ' '::\"char\" " "ELSE (SELECT relkind FROM pg_class WHERE oid = typrelid) END AS typrelkind, " "typtype, typisdefined, " @@ -3820,8 +3814,6 @@ getTypes(Archive *fout, int *numTypes) i_inittypacl = PQfnumber(res, "inittypacl"); i_initrtypacl = PQfnumber(res, "initrtypacl"); i_rolname = PQfnumber(res, "rolname"); - i_typinput = PQfnumber(res, "typinput"); - i_typoutput = PQfnumber(res, "typoutput"); i_typelem = PQfnumber(res, "typelem"); i_typrelid = PQfnumber(res, "typrelid"); i_typrelkind = PQfnumber(res, "typrelkind"); -- 2.40.0