@@ -2879,11 +2879,7 @@ _selectTablespace(ArchiveHandle *AH, const char *tablespace)
28792879/*
28802880 * Extract an object description for a TOC entry, and append it to buf.
28812881 *
2882- * This is not quite as general as it may seem, since it really only
2883- * handles constructing the right thing to put into ALTER ... OWNER TO.
2884- *
2885- * The whole thing is pretty grotty, but we are kind of stuck since the
2886- * information used is all that's available in older dump files.
2882+ * This is used for ALTER ... OWNER TO.
28872883 */
28882884static void
28892885_getObjectDescription (PQExpBuffer buf ,TocEntry * te ,ArchiveHandle * AH )
@@ -2895,43 +2891,24 @@ _getObjectDescription(PQExpBuffer buf, TocEntry *te, ArchiveHandle *AH)
28952891strcmp (type ,"MATERIALIZED VIEW" )== 0 )
28962892type = "TABLE" ;
28972893
2898- /* objectsnamed by a schema and name */
2894+ /* objectsthat don't require special decoration */
28992895if (strcmp (type ,"COLLATION" )== 0 ||
29002896strcmp (type ,"CONVERSION" )== 0 ||
29012897strcmp (type ,"DOMAIN" )== 0 ||
29022898strcmp (type ,"TABLE" )== 0 ||
29032899strcmp (type ,"TYPE" )== 0 ||
29042900strcmp (type ,"FOREIGN TABLE" )== 0 ||
29052901strcmp (type ,"TEXT SEARCH DICTIONARY" )== 0 ||
2906- strcmp (type ,"TEXT SEARCH CONFIGURATION" )== 0 )
2907- {
2908- appendPQExpBuffer (buf ,"%s " ,type );
2909- if (te -> namespace && te -> namespace [0 ])/* is null pre-7.3 */
2910- appendPQExpBuffer (buf ,"%s." ,fmtId (te -> namespace ));
2911-
2912- /*
2913- * Pre-7.3 pg_dump would sometimes (not always) put a fmtId'd name
2914- * into te->tag for an index. This check is heuristic, so make its
2915- * scope as narrow as possible.
2916- */
2917- if (AH -> version < K_VERS_1_7 &&
2918- te -> tag [0 ]== '"' &&
2919- te -> tag [strlen (te -> tag )- 1 ]== '"' &&
2920- strcmp (type ,"INDEX" )== 0 )
2921- appendPQExpBuffer (buf ,"%s" ,te -> tag );
2922- else
2923- appendPQExpBuffer (buf ,"%s" ,fmtId (te -> tag ));
2924- return ;
2925- }
2926-
2927- /* objects named by just a name */
2928- if (strcmp (type ,"DATABASE" )== 0 ||
2902+ strcmp (type ,"TEXT SEARCH CONFIGURATION" )== 0 ||
2903+ /* non-schema-specified objects */
2904+ strcmp (type ,"DATABASE" )== 0 ||
29292905strcmp (type ,"PROCEDURAL LANGUAGE" )== 0 ||
29302906strcmp (type ,"SCHEMA" )== 0 ||
29312907strcmp (type ,"FOREIGN DATA WRAPPER" )== 0 ||
29322908strcmp (type ,"SERVER" )== 0 ||
29332909strcmp (type ,"USER MAPPING" )== 0 )
29342910{
2911+ /* We already know that search_path was set properly */
29352912appendPQExpBuffer (buf ,"%s %s" ,type ,fmtId (te -> tag ));
29362913return ;
29372914}