mirror of https://github.com/citusdata/citus.git
To show object description check
parent
eca6542023
commit
752419ff14
|
@ -669,7 +669,22 @@ ProcessUtilityInternal(PlannedStmt *pstmt,
|
|||
if (ops && ops->address)
|
||||
{
|
||||
ObjectAddress targetObject = GetObjectAddressFromParseTree(parsetree, true);
|
||||
ErrorIfCircularDependencyExists(&targetObject);
|
||||
char *objectDescription = NULL;
|
||||
|
||||
#if PG_VERSION_NUM >= PG_VERSION_14
|
||||
objectDescription = getObjectDescription(&targetObject, true);
|
||||
#else
|
||||
objectDescription = getObjectDescription(&targetObject);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Having object description as NULL means the target object is either dropped
|
||||
* or it's name has been changed
|
||||
*/
|
||||
if (objectDescription != NULL)
|
||||
{
|
||||
ErrorIfCircularDependencyExists(&targetObject);
|
||||
}
|
||||
}
|
||||
|
||||
if (ops && ops->postprocess)
|
||||
|
|
|
@ -385,6 +385,12 @@ RecurseObjectDependencies(ObjectAddress target, expandFn expand, followFn follow
|
|||
void
|
||||
ErrorIfCircularDependencyExists(const ObjectAddress *objectAddress)
|
||||
{
|
||||
|
||||
/*
|
||||
* We need to get the see dependencies created in this command.
|
||||
*/
|
||||
CommandCounterIncrement();
|
||||
|
||||
List *dependencies = GetAllSupportedDependenciesForObject(objectAddress);
|
||||
|
||||
ObjectAddress *dependency = NULL;
|
||||
|
|
Loading…
Reference in New Issue