mirror of
https://github.com/postgres/postgres.git
synced 2025-08-25 20:23:07 +03:00
Try to make 'cross-database references are not implemented' errors a
bit more helpful by identifying the specific qualified name being complained of.
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/catalog/namespace.c,v 1.62 2004/01/19 19:04:40 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/catalog/namespace.c,v 1.63 2004/02/13 01:08:20 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -165,7 +165,9 @@ RangeVarGetRelid(const RangeVar *relation, bool failOK)
|
||||
if (strcmp(relation->catalogname, get_database_name(MyDatabaseId)) != 0)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("cross-database references are not implemented")));
|
||||
errmsg("cross-database references are not implemented: \"%s.%s.%s\"",
|
||||
relation->catalogname, relation->schemaname,
|
||||
relation->relname)));
|
||||
}
|
||||
|
||||
if (relation->schemaname)
|
||||
@@ -218,7 +220,9 @@ RangeVarGetCreationNamespace(const RangeVar *newRelation)
|
||||
if (strcmp(newRelation->catalogname, get_database_name(MyDatabaseId)) != 0)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("cross-database references are not implemented")));
|
||||
errmsg("cross-database references are not implemented: \"%s.%s.%s\"",
|
||||
newRelation->catalogname, newRelation->schemaname,
|
||||
newRelation->relname)));
|
||||
}
|
||||
|
||||
if (newRelation->istemp)
|
||||
@@ -1182,7 +1186,8 @@ DeconstructQualifiedName(List *names,
|
||||
if (strcmp(catalogname, get_database_name(MyDatabaseId)) != 0)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("cross-database references are not implemented")));
|
||||
errmsg("cross-database references are not implemented: %s",
|
||||
NameListToString(names))));
|
||||
break;
|
||||
default:
|
||||
ereport(ERROR,
|
||||
|
Reference in New Issue
Block a user