case OCLASS_PROC:
appendStringInfoString(&buffer,
- format_procedure_qualified(object->objectId));
+ format_procedure_qualified(object->objectId));
break;
case OCLASS_TYPE:
appendStringInfoString(&buffer,
- format_type_be_qualified(object->objectId));
+ format_type_be_qualified(object->objectId));
break;
case OCLASS_CAST:
object->objectId);
conForm = (Form_pg_conversion) GETSTRUCT(conTup);
appendStringInfoString(&buffer,
- quote_identifier(NameStr(conForm->conname)));
+ quote_identifier(NameStr(conForm->conname)));
ReleaseSysCache(conTup);
break;
}
case OCLASS_OPERATOR:
appendStringInfoString(&buffer,
- format_operator_qualified(object->objectId));
+ format_operator_qualified(object->objectId));
break;
case OCLASS_OPCLASS:
amForm = (Form_pg_am) GETSTRUCT(amTup);
appendStringInfoString(&buffer,
- quote_qualified_identifier(schema,
+ quote_qualified_identifier(schema,
NameStr(opcForm->opcname)));
appendStringInfo(&buffer, " for %s",
quote_identifier(NameStr(amForm->amname)));
elog(ERROR, "cache lookup failed for namespace %u",
object->objectId);
appendStringInfoString(&buffer,
- quote_identifier(nspname));
+ quote_identifier(nspname));
break;
}
{
HeapTuple tup;
Form_pg_ts_parser formParser;
+ char *schema;
tup = SearchSysCache1(TSPARSEROID,
ObjectIdGetDatum(object->objectId));
elog(ERROR, "cache lookup failed for text search parser %u",
object->objectId);
formParser = (Form_pg_ts_parser) GETSTRUCT(tup);
+ schema = get_namespace_name(formParser->prsnamespace);
appendStringInfoString(&buffer,
- quote_identifier(NameStr(formParser->prsname)));
+ quote_qualified_identifier(schema,
+ NameStr(formParser->prsname)));
ReleaseSysCache(tup);
break;
}
{
HeapTuple tup;
Form_pg_ts_dict formDict;
+ char *schema;
tup = SearchSysCache1(TSDICTOID,
ObjectIdGetDatum(object->objectId));
elog(ERROR, "cache lookup failed for text search dictionary %u",
object->objectId);
formDict = (Form_pg_ts_dict) GETSTRUCT(tup);
+ schema = get_namespace_name(formDict->dictnamespace);
appendStringInfoString(&buffer,
- quote_identifier(NameStr(formDict->dictname)));
+ quote_qualified_identifier(schema,
+ NameStr(formDict->dictname)));
ReleaseSysCache(tup);
break;
}
{
HeapTuple tup;
Form_pg_ts_template formTmpl;
+ char *schema;
tup = SearchSysCache1(TSTEMPLATEOID,
ObjectIdGetDatum(object->objectId));
elog(ERROR, "cache lookup failed for text search template %u",
object->objectId);
formTmpl = (Form_pg_ts_template) GETSTRUCT(tup);
+ schema = get_namespace_name(formTmpl->tmplnamespace);
appendStringInfoString(&buffer,
- quote_identifier(NameStr(formTmpl->tmplname)));
+ quote_qualified_identifier(schema,
+ NameStr(formTmpl->tmplname)));
+ pfree(schema);
ReleaseSysCache(tup);
break;
}
{
HeapTuple tup;
Form_pg_ts_config formCfg;
+ char *schema;
tup = SearchSysCache1(TSCONFIGOID,
ObjectIdGetDatum(object->objectId));
elog(ERROR, "cache lookup failed for text search configuration %u",
object->objectId);
formCfg = (Form_pg_ts_config) GETSTRUCT(tup);
+ schema = get_namespace_name(formCfg->cfgnamespace);
appendStringInfoString(&buffer,
- quote_identifier(NameStr(formCfg->cfgname)));
+ quote_qualified_identifier(schema,
+ NameStr(formCfg->cfgname)));
ReleaseSysCache(tup);
break;
}
username = GetUserNameFromId(object->objectId);
appendStringInfoString(&buffer,
- quote_identifier(username));
+ quote_identifier(username));
break;
}
elog(ERROR, "cache lookup failed for database %u",
object->objectId);
appendStringInfoString(&buffer,
- quote_identifier(datname));
+ quote_identifier(datname));
break;
}
elog(ERROR, "cache lookup failed for tablespace %u",
object->objectId);
appendStringInfoString(&buffer,
- quote_identifier(tblspace));
+ quote_identifier(tblspace));
break;
}
srv = GetForeignServer(object->objectId);
appendStringInfoString(&buffer,
- quote_identifier(srv->servername));
+ quote_identifier(srv->servername));
break;
}
schema = get_namespace_name(relForm->relnamespace);
appendStringInfoString(buffer,
- quote_qualified_identifier(schema,
- NameStr(relForm->relname)));
+ quote_qualified_identifier(schema,
+ NameStr(relForm->relname)));
ReleaseSysCache(relTup);
}