mirror of https://github.com/citusdata/citus.git
Omit RangeVarCallbackForDropIndex from formatting
I removed two braces to have this function remain more similar to the original PostgreSQL function and added uncrustify commands to disable formatting of its contents.pull/327/head
parent
fdb37682b2
commit
f874a56e24
|
@ -989,6 +989,7 @@ AllFinalizedPlacementsAccessible(Oid relationId)
|
||||||
static void
|
static void
|
||||||
RangeVarCallbackForDropIndex(const RangeVar *rel, Oid relOid, Oid oldRelOid, void *arg)
|
RangeVarCallbackForDropIndex(const RangeVar *rel, Oid relOid, Oid oldRelOid, void *arg)
|
||||||
{
|
{
|
||||||
|
/* *INDENT-OFF* */
|
||||||
HeapTuple tuple;
|
HeapTuple tuple;
|
||||||
struct DropRelationCallbackState *state;
|
struct DropRelationCallbackState *state;
|
||||||
char relkind;
|
char relkind;
|
||||||
|
@ -1023,10 +1024,8 @@ RangeVarCallbackForDropIndex(const RangeVar *rel, Oid relOid, Oid oldRelOid, voi
|
||||||
classform = (Form_pg_class) GETSTRUCT(tuple);
|
classform = (Form_pg_class) GETSTRUCT(tuple);
|
||||||
|
|
||||||
if (classform->relkind != relkind)
|
if (classform->relkind != relkind)
|
||||||
{
|
|
||||||
ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE),
|
ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE),
|
||||||
errmsg("\"%s\" is not an index", rel->relname)));
|
errmsg("\"%s\" is not an index", rel->relname)));
|
||||||
}
|
|
||||||
|
|
||||||
/* Allow DROP to either table owner or schema owner */
|
/* Allow DROP to either table owner or schema owner */
|
||||||
if (!pg_class_ownercheck(relOid, GetUserId()) &&
|
if (!pg_class_ownercheck(relOid, GetUserId()) &&
|
||||||
|
@ -1055,4 +1054,5 @@ RangeVarCallbackForDropIndex(const RangeVar *rel, Oid relOid, Oid oldRelOid, voi
|
||||||
if (OidIsValid(state->heapOid))
|
if (OidIsValid(state->heapOid))
|
||||||
LockRelationOid(state->heapOid, heap_lockmode);
|
LockRelationOid(state->heapOid, heap_lockmode);
|
||||||
}
|
}
|
||||||
|
/* *INDENT-ON* */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue