mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	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.
			
			
This commit is contained in:
		@@ -3688,8 +3688,6 @@ getTypes(Archive *fout, int *numTypes)
 | 
				
			|||||||
	int			i_inittypacl;
 | 
						int			i_inittypacl;
 | 
				
			||||||
	int			i_initrtypacl;
 | 
						int			i_initrtypacl;
 | 
				
			||||||
	int			i_rolname;
 | 
						int			i_rolname;
 | 
				
			||||||
	int			i_typinput;
 | 
					 | 
				
			||||||
	int			i_typoutput;
 | 
					 | 
				
			||||||
	int			i_typelem;
 | 
						int			i_typelem;
 | 
				
			||||||
	int			i_typrelid;
 | 
						int			i_typrelid;
 | 
				
			||||||
	int			i_typrelkind;
 | 
						int			i_typrelkind;
 | 
				
			||||||
@@ -3734,8 +3732,7 @@ getTypes(Archive *fout, int *numTypes)
 | 
				
			|||||||
						  "%s AS inittypacl, "
 | 
											  "%s AS inittypacl, "
 | 
				
			||||||
						  "%s AS initrtypacl, "
 | 
											  "%s AS initrtypacl, "
 | 
				
			||||||
						  "(%s t.typowner) AS rolname, "
 | 
											  "(%s t.typowner) AS rolname, "
 | 
				
			||||||
						  "t.typinput::oid AS typinput, "
 | 
											  "t.typelem, t.typrelid, "
 | 
				
			||||||
					 "t.typoutput::oid AS typoutput, t.typelem, t.typrelid, "
 | 
					 | 
				
			||||||
						  "CASE WHEN t.typrelid = 0 THEN ' '::\"char\" "
 | 
											  "CASE WHEN t.typrelid = 0 THEN ' '::\"char\" "
 | 
				
			||||||
						  "ELSE (SELECT relkind FROM pg_class WHERE oid = t.typrelid) END AS typrelkind, "
 | 
											  "ELSE (SELECT relkind FROM pg_class WHERE oid = t.typrelid) END AS typrelkind, "
 | 
				
			||||||
						  "t.typtype, t.typisdefined, "
 | 
											  "t.typtype, t.typisdefined, "
 | 
				
			||||||
@@ -3763,8 +3760,7 @@ getTypes(Archive *fout, int *numTypes)
 | 
				
			|||||||
						  "typnamespace, typacl, NULL as rtypacl, "
 | 
											  "typnamespace, typacl, NULL as rtypacl, "
 | 
				
			||||||
						  "NULL AS inittypacl, NULL AS initrtypacl, "
 | 
											  "NULL AS inittypacl, NULL AS initrtypacl, "
 | 
				
			||||||
						  "(%s typowner) AS rolname, "
 | 
											  "(%s typowner) AS rolname, "
 | 
				
			||||||
						  "typinput::oid AS typinput, "
 | 
											  "typelem, typrelid, "
 | 
				
			||||||
						  "typoutput::oid AS typoutput, typelem, typrelid, "
 | 
					 | 
				
			||||||
						  "CASE WHEN typrelid = 0 THEN ' '::\"char\" "
 | 
											  "CASE WHEN typrelid = 0 THEN ' '::\"char\" "
 | 
				
			||||||
						  "ELSE (SELECT relkind FROM pg_class WHERE oid = typrelid) END AS typrelkind, "
 | 
											  "ELSE (SELECT relkind FROM pg_class WHERE oid = typrelid) END AS typrelkind, "
 | 
				
			||||||
						  "typtype, typisdefined, "
 | 
											  "typtype, typisdefined, "
 | 
				
			||||||
@@ -3779,8 +3775,7 @@ getTypes(Archive *fout, int *numTypes)
 | 
				
			|||||||
						  "typnamespace, NULL AS typacl, NULL as rtypacl, "
 | 
											  "typnamespace, NULL AS typacl, NULL as rtypacl, "
 | 
				
			||||||
						  "NULL AS inittypacl, NULL AS initrtypacl, "
 | 
											  "NULL AS inittypacl, NULL AS initrtypacl, "
 | 
				
			||||||
						  "(%s typowner) AS rolname, "
 | 
											  "(%s typowner) AS rolname, "
 | 
				
			||||||
						  "typinput::oid AS typinput, "
 | 
											  "typelem, typrelid, "
 | 
				
			||||||
						  "typoutput::oid AS typoutput, typelem, typrelid, "
 | 
					 | 
				
			||||||
						  "CASE WHEN typrelid = 0 THEN ' '::\"char\" "
 | 
											  "CASE WHEN typrelid = 0 THEN ' '::\"char\" "
 | 
				
			||||||
						  "ELSE (SELECT relkind FROM pg_class WHERE oid = typrelid) END AS typrelkind, "
 | 
											  "ELSE (SELECT relkind FROM pg_class WHERE oid = typrelid) END AS typrelkind, "
 | 
				
			||||||
						  "typtype, typisdefined, "
 | 
											  "typtype, typisdefined, "
 | 
				
			||||||
@@ -3795,8 +3790,7 @@ getTypes(Archive *fout, int *numTypes)
 | 
				
			|||||||
						  "typnamespace, NULL AS typacl, NULL as rtypacl, "
 | 
											  "typnamespace, NULL AS typacl, NULL as rtypacl, "
 | 
				
			||||||
						  "NULL AS inittypacl, NULL AS initrtypacl, "
 | 
											  "NULL AS inittypacl, NULL AS initrtypacl, "
 | 
				
			||||||
						  "(%s typowner) AS rolname, "
 | 
											  "(%s typowner) AS rolname, "
 | 
				
			||||||
						  "typinput::oid AS typinput, "
 | 
											  "typelem, typrelid, "
 | 
				
			||||||
						  "typoutput::oid AS typoutput, typelem, typrelid, "
 | 
					 | 
				
			||||||
						  "CASE WHEN typrelid = 0 THEN ' '::\"char\" "
 | 
											  "CASE WHEN typrelid = 0 THEN ' '::\"char\" "
 | 
				
			||||||
						  "ELSE (SELECT relkind FROM pg_class WHERE oid = typrelid) END AS typrelkind, "
 | 
											  "ELSE (SELECT relkind FROM pg_class WHERE oid = typrelid) END AS typrelkind, "
 | 
				
			||||||
						  "typtype, typisdefined, "
 | 
											  "typtype, typisdefined, "
 | 
				
			||||||
@@ -3820,8 +3814,6 @@ getTypes(Archive *fout, int *numTypes)
 | 
				
			|||||||
	i_inittypacl = PQfnumber(res, "inittypacl");
 | 
						i_inittypacl = PQfnumber(res, "inittypacl");
 | 
				
			||||||
	i_initrtypacl = PQfnumber(res, "initrtypacl");
 | 
						i_initrtypacl = PQfnumber(res, "initrtypacl");
 | 
				
			||||||
	i_rolname = PQfnumber(res, "rolname");
 | 
						i_rolname = PQfnumber(res, "rolname");
 | 
				
			||||||
	i_typinput = PQfnumber(res, "typinput");
 | 
					 | 
				
			||||||
	i_typoutput = PQfnumber(res, "typoutput");
 | 
					 | 
				
			||||||
	i_typelem = PQfnumber(res, "typelem");
 | 
						i_typelem = PQfnumber(res, "typelem");
 | 
				
			||||||
	i_typrelid = PQfnumber(res, "typrelid");
 | 
						i_typrelid = PQfnumber(res, "typrelid");
 | 
				
			||||||
	i_typrelkind = PQfnumber(res, "typrelkind");
 | 
						i_typrelkind = PQfnumber(res, "typrelkind");
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user