Run check_indent on COPY changes

pull/366/head
Marco Slot 2016-03-01 12:05:58 +01:00 committed by Metin Doslu
parent 2a8121ca5f
commit 9bb579b1b1
5 changed files with 38 additions and 34 deletions

View File

@ -239,7 +239,8 @@ typedef struct ShardConnections
static HTAB * CreateShardConnectionHash(void);
static bool IsUniformHashDistribution(ShardInterval **shardIntervalArray,
int shardCount);
static FmgrInfo * ShardIntervalCompareFunction(Var *partitionColumn, char partitionMethod);
static FmgrInfo * ShardIntervalCompareFunction(Var *partitionColumn, char
partitionMethod);
static ShardInterval * FindShardInterval(Datum partitionColumnValue,
ShardInterval **shardIntervalCache,
int shardCount, char partitionMethod,
@ -319,7 +320,8 @@ CitusCopyFrom(CopyStmt *copyStatement, char* completionTag)
if (partitionMethod != DISTRIBUTE_BY_RANGE && partitionMethod != DISTRIBUTE_BY_HASH)
{
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("COPY is only supported for hash- and range-partitioned tables")));
errmsg(
"COPY is only supported for hash- and range-partitioned tables")));
}
/* resolve hash function for partition column */
@ -682,17 +684,18 @@ SearchCachedShardInterval(Datum partitionColumnValue, ShardInterval** shardInter
if (DatumGetInt32(FunctionCall2Coll(compareFunction,
DEFAULT_COLLATION_OID,
partitionColumnValue,
shardIntervalCache[middleIndex]->minValue)) < 0)
shardIntervalCache[middleIndex]->minValue)) <
0)
{
upperBoundIndex = middleIndex;
}
else if (DatumGetInt32(FunctionCall2Coll(compareFunction,
DEFAULT_COLLATION_OID,
partitionColumnValue,
shardIntervalCache[middleIndex]->maxValue)) <= 0)
shardIntervalCache[middleIndex]->maxValue))
<= 0)
{
return shardIntervalCache[middleIndex];
}
else
{
@ -848,7 +851,8 @@ AppendCopyOptions(StringInfo command, List *copyOptionList)
{
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("argument to option \"%s\" must be a list of column names",
errmsg(
"argument to option \"%s\" must be a list of column names",
option->defname)));
}
else