mirror of https://github.com/citusdata/citus.git
Fix style
parent
e1f5520e1a
commit
0b67fcf81d
|
@ -2019,7 +2019,6 @@ ColumnarProcessUtility(PlannedStmt *pstmt,
|
|||
DestReceiver *dest,
|
||||
QueryCompletionCompat *completionTag)
|
||||
{
|
||||
|
||||
#if PG_VERSION_NUM >= PG_VERSION_14
|
||||
if (readOnlyTree)
|
||||
{
|
||||
|
|
|
@ -251,7 +251,9 @@ GetDependencyCreateDDLCommands(const ObjectAddress *dependency)
|
|||
*/
|
||||
Assert(false);
|
||||
ereport(ERROR, (errmsg("unsupported object %s for distribution by citus",
|
||||
getObjectTypeDescription_compat(dependency, /* missingOk: */ false)),
|
||||
getObjectTypeDescription_compat(dependency,
|
||||
|
||||
/* missingOk: */ false)),
|
||||
errdetail(
|
||||
"citus tries to recreate an unsupported object on its workers"),
|
||||
errhint("please report a bug as this should not be happening")));
|
||||
|
|
|
@ -810,15 +810,21 @@ deparse_shard_reindex_statement(ReindexStmt *origStmt, Oid distrelid, int64 shar
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* IsReindexWithParam_compat returns true if the given parameter
|
||||
* exists for the given reindexStmt.
|
||||
*/
|
||||
bool IsReindexWithParam_compat(ReindexStmt* reindexStmt, char* param) {
|
||||
bool
|
||||
IsReindexWithParam_compat(ReindexStmt *reindexStmt, char *param)
|
||||
{
|
||||
#if PG_VERSION_NUM < PG_VERSION_14
|
||||
if (strcmp(param, "concurrently") == 0) {
|
||||
if (strcmp(param, "concurrently") == 0)
|
||||
{
|
||||
return reindexStmt->concurrent;
|
||||
}else if (strcmp(param, "verbose") == 0) {
|
||||
}
|
||||
else if (strcmp(param, "verbose") == 0)
|
||||
{
|
||||
return reindexStmt->options & REINDEXOPT_VERBOSE;
|
||||
}
|
||||
return false;
|
||||
|
@ -833,7 +839,6 @@ bool IsReindexWithParam_compat(ReindexStmt* reindexStmt, char* param) {
|
|||
}
|
||||
return false;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -1292,6 +1297,7 @@ RoleSpecString(RoleSpec *spec, bool withQuoteIdentifier)
|
|||
quote_identifier(spec->rolename) :
|
||||
spec->rolename;
|
||||
}
|
||||
|
||||
#if PG_VERSION_NUM >= PG_VERSION_14
|
||||
case ROLESPEC_CURRENT_ROLE:
|
||||
#endif
|
||||
|
|
|
@ -233,6 +233,7 @@ AppendStatTypes(StringInfo buf, CreateStatsStmt *stmt)
|
|||
appendStringInfoString(buf, ")");
|
||||
}
|
||||
|
||||
|
||||
#if PG_VERSION_NUM >= PG_VERSION_14
|
||||
static void
|
||||
AppendColumnNames(StringInfo buf, CreateStatsStmt *stmt)
|
||||
|
@ -259,6 +260,8 @@ AppendColumnNames(StringInfo buf, CreateStatsStmt *stmt)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
static void
|
||||
AppendColumnNames(StringInfo buf, CreateStatsStmt *stmt)
|
||||
|
@ -285,6 +288,8 @@ AppendColumnNames(StringInfo buf, CreateStatsStmt *stmt)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
static void
|
||||
|
|
|
@ -75,8 +75,12 @@ citus_unmark_object_distributed(PG_FUNCTION_ARGS)
|
|||
{
|
||||
ereport(ERROR, (errmsg("object still exists"),
|
||||
errdetail("the %s \"%s\" still exists",
|
||||
getObjectTypeDescription_compat(&address, /* missingOk: */ false),
|
||||
getObjectIdentity_compat(&address, /* missingOk: */ false)),
|
||||
getObjectTypeDescription_compat(&address,
|
||||
|
||||
/* missingOk: */ false),
|
||||
getObjectIdentity_compat(&address,
|
||||
|
||||
/* missingOk: */ false)),
|
||||
errhint("drop the object via a DROP command")));
|
||||
}
|
||||
|
||||
|
|
|
@ -689,7 +689,6 @@ ShardsMatchingDeleteCriteria(Oid relationId, List *shardIntervalList,
|
|||
List *deleteCriteriaList = list_make1(deleteCriteria);
|
||||
|
||||
|
||||
|
||||
/* walk over shard list and check if shards can be dropped */
|
||||
ShardInterval *shardInterval = NULL;
|
||||
foreach_ptr(shardInterval, shardIntervalList)
|
||||
|
|
|
@ -286,6 +286,7 @@ ExplainSubPlans(DistributedPlan *distributedPlan, ExplainState *es)
|
|||
PlannedStmt *plan = subPlan->plan;
|
||||
IntoClause *into = NULL;
|
||||
ParamListInfo params = NULL;
|
||||
|
||||
/*
|
||||
* With PG14, we need to provide a string here,
|
||||
* for now we put an empty string, which is valid according to postgres.
|
||||
|
|
|
@ -1890,6 +1890,7 @@ MasterAggregateExpression(Aggref *originalAggregate,
|
|||
if (aggregateType == AGGREGATE_ARRAY_AGG)
|
||||
{
|
||||
#if PG_VERSION_NUM >= PG_VERSION_14
|
||||
|
||||
/*
|
||||
* Postgres expects the type of the array here such as INT4ARRAYOID.
|
||||
* Hence we set it to workerReturnType. If we set this to
|
||||
|
|
|
@ -2054,7 +2054,8 @@ GetRestrictInfoListForRelation(RangeTblEntry *rangeTblEntry,
|
|||
* If the restriction involves multiple tables, we cannot add it to
|
||||
* input relation's expression list.
|
||||
*/
|
||||
Relids varnos = pull_varnos_compat(relationRestriction->plannerInfo, (Node *) restrictionClause);
|
||||
Relids varnos = pull_varnos_compat(relationRestriction->plannerInfo,
|
||||
(Node *) restrictionClause);
|
||||
if (bms_num_members(varnos) != 1)
|
||||
{
|
||||
continue;
|
||||
|
|
|
@ -239,6 +239,7 @@ s/ERROR: ROLLBACK is not allowed in an SQL function/ERROR: ROLLBACK is not all
|
|||
/.*Async Capable.*/d
|
||||
/Parent Relationship/d
|
||||
/Parent-Relationship/d
|
||||
s/function array_cat_agg\(anyarray\) anyarray/function array_cat_agg\(anycompatiblearray\) anycompatiblearray/g
|
||||
s/function array_cat_agg\(anycompatiblearray\)/function array_cat_agg\(anyarray\)/g
|
||||
s/TRIM\(BOTH FROM value\)/btrim\(value\)/g
|
||||
s/pg14\.idx.*/pg14\.xxxxx/g
|
||||
|
|
|
@ -20,4 +20,5 @@
|
|||
/multi_mx_copy_data.out
|
||||
/multi_outer_join.out
|
||||
/multi_outer_join_reference.out
|
||||
/tablespace.out
|
||||
/worker_copy.out
|
||||
|
|
|
@ -139,7 +139,7 @@ SELECT * FROM multi_extension.print_extension_changes();
|
|||
| function alter_role_if_exists(text,text) boolean
|
||||
| function any_value(anyelement) anyelement
|
||||
| function any_value_agg(anyelement,anyelement) anyelement
|
||||
| function array_cat_agg(anycompatiblearray) anycompatiblearray
|
||||
| function array_cat_agg(anyarray) anycompatiblearray
|
||||
| function assign_distributed_transaction_id(integer,bigint,timestamp with time zone) void
|
||||
| function authinfo_valid(text) boolean
|
||||
| function broadcast_intermediate_result(text,text) bigint
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
CREATE TABLESPACE test_tablespace LOCATION '/home/talha/citus/src/test/regress/data/ts0';
|
||||
\c - - - :worker_1_port
|
||||
CREATE TABLESPACE test_tablespace LOCATION '/home/talha/citus/src/test/regress/data/ts1';
|
||||
\c - - - :worker_2_port
|
||||
CREATE TABLESPACE test_tablespace LOCATION '/home/talha/citus/src/test/regress/data/ts2';
|
|
@ -26,7 +26,7 @@ ORDER BY 1;
|
|||
function alter_table_set_access_method(regclass,text)
|
||||
function any_value(anyelement)
|
||||
function any_value_agg(anyelement,anyelement)
|
||||
function array_cat_agg(anycompatiblearray)
|
||||
function array_cat_agg(anyarray)
|
||||
function assign_distributed_transaction_id(integer,bigint,timestamp with time zone)
|
||||
function authinfo_valid(text)
|
||||
function broadcast_intermediate_result(text,text)
|
||||
|
|
|
@ -23,7 +23,7 @@ ORDER BY 1;
|
|||
function alter_table_set_access_method(regclass,text)
|
||||
function any_value(anyelement)
|
||||
function any_value_agg(anyelement,anyelement)
|
||||
function array_cat_agg(anycompatiblearray)
|
||||
function array_cat_agg(anyarray)
|
||||
function assign_distributed_transaction_id(integer,bigint,timestamp with time zone)
|
||||
function authinfo_valid(text)
|
||||
function broadcast_intermediate_result(text,text)
|
||||
|
|
|
@ -20,4 +20,5 @@
|
|||
/multi_mx_copy_data.sql
|
||||
/multi_outer_join.sql
|
||||
/multi_outer_join_reference.sql
|
||||
/tablespace.sql
|
||||
/worker_copy.sql
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
CREATE TABLESPACE test_tablespace LOCATION '/home/talha/citus/src/test/regress/data/ts0';
|
||||
\c - - - :worker_1_port
|
||||
CREATE TABLESPACE test_tablespace LOCATION '/home/talha/citus/src/test/regress/data/ts1';
|
||||
\c - - - :worker_2_port
|
||||
CREATE TABLESPACE test_tablespace LOCATION '/home/talha/citus/src/test/regress/data/ts2';
|
Loading…
Reference in New Issue