Fix style

talha_testpg14
Sait Talha Nisanci 2021-08-27 09:46:08 +03:00
parent 4eaae02549
commit fb5e63ce57
17 changed files with 39 additions and 42 deletions

View File

@ -1935,7 +1935,6 @@ ColumnarProcessUtility(PlannedStmt *pstmt,
DestReceiver *dest, DestReceiver *dest,
QueryCompletionCompat *completionTag) QueryCompletionCompat *completionTag)
{ {
#if PG_VERSION_NUM >= PG_VERSION_14 #if PG_VERSION_NUM >= PG_VERSION_14
if (readOnlyTree) if (readOnlyTree)
{ {

View File

@ -251,7 +251,9 @@ GetDependencyCreateDDLCommands(const ObjectAddress *dependency)
*/ */
Assert(false); Assert(false);
ereport(ERROR, (errmsg("unsupported object %s for distribution by citus", ereport(ERROR, (errmsg("unsupported object %s for distribution by citus",
getObjectTypeDescription_compat(dependency, /* missingOk: */ false)), getObjectTypeDescription_compat(dependency,
/* missingOk: */ false)),
errdetail( errdetail(
"citus tries to recreate an unsupported object on its workers"), "citus tries to recreate an unsupported object on its workers"),
errhint("please report a bug as this should not be happening"))); errhint("please report a bug as this should not be happening")));

View File

@ -1613,7 +1613,7 @@ PreprocessAlterFunctionDependsStmt(Node *node, const char *queryString,
* workers * workers
*/ */
const char *functionName = const char *functionName =
getObjectIdentity_compat(&address, /* missingOk: */ false); getObjectIdentity_compat(&address, /* missingOk: */ false);
ereport(ERROR, (errmsg("distrtibuted functions are not allowed to depend on an " ereport(ERROR, (errmsg("distrtibuted functions are not allowed to depend on an "
"extension"), "extension"),
@ -1933,9 +1933,9 @@ ErrorIfFunctionDependsOnExtension(const ObjectAddress *functionAddress)
if (IsObjectAddressOwnedByExtension(functionAddress, &extensionAddress)) if (IsObjectAddressOwnedByExtension(functionAddress, &extensionAddress))
{ {
char *functionName = char *functionName =
getObjectIdentity_compat(functionAddress, /* missingOk: */ false); getObjectIdentity_compat(functionAddress, /* missingOk: */ false);
char *extensionName = char *extensionName =
getObjectIdentity_compat(&extensionAddress, /* missingOk: */ false); getObjectIdentity_compat(&extensionAddress, /* missingOk: */ false);
ereport(ERROR, (errmsg("unable to create a distributed function from functions " ereport(ERROR, (errmsg("unable to create a distributed function from functions "
"owned by an extension"), "owned by an extension"),

View File

@ -212,9 +212,9 @@ DoLocalCopy(StringInfo buffer, Oid relationId, int64 shardId, CopyStmt *copyStat
(void) addRangeTableEntryForRelation(pState, shard, AccessShareLock, (void) addRangeTableEntryForRelation(pState, shard, AccessShareLock,
NULL, false, false); NULL, false, false);
CopyFromState cstate = BeginCopyFrom_compat(pState, shard, NULL, NULL, false, CopyFromState cstate = BeginCopyFrom_compat(pState, shard, NULL, NULL, false,
ReadFromLocalBufferCallback, ReadFromLocalBufferCallback,
copyStatement->attlist, copyStatement->attlist,
copyStatement->options); copyStatement->options);
CopyFrom(cstate); CopyFrom(cstate);
EndCopyFrom(cstate); EndCopyFrom(cstate);

View File

@ -524,13 +524,13 @@ CopyToExistingShards(CopyStmt *copyStatement, QueryCompletionCompat *completionT
/* initialize copy state to read from COPY data source */ /* initialize copy state to read from COPY data source */
CopyFromState copyState = BeginCopyFrom_compat(NULL, CopyFromState copyState = BeginCopyFrom_compat(NULL,
copiedDistributedRelation, copiedDistributedRelation,
NULL, NULL,
copyStatement->filename, copyStatement->filename,
copyStatement->is_program, copyStatement->is_program,
NULL, NULL,
copyStatement->attlist, copyStatement->attlist,
copyStatement->options); copyStatement->options);
/* set up callback to identify error line number */ /* set up callback to identify error line number */
errorCallback.callback = CopyFromErrorCallback; errorCallback.callback = CopyFromErrorCallback;
@ -622,13 +622,13 @@ CopyToNewShards(CopyStmt *copyStatement, QueryCompletionCompat *completionTag, O
/* initialize copy state to read from COPY data source */ /* initialize copy state to read from COPY data source */
CopyFromState copyState = BeginCopyFrom_compat(NULL, CopyFromState copyState = BeginCopyFrom_compat(NULL,
distributedRelation, distributedRelation,
NULL, NULL,
copyStatement->filename, copyStatement->filename,
copyStatement->is_program, copyStatement->is_program,
NULL, NULL,
copyStatement->attlist, copyStatement->attlist,
copyStatement->options); copyStatement->options);
CopyOutState copyOutState = (CopyOutState) palloc0(sizeof(CopyOutStateData)); CopyOutState copyOutState = (CopyOutState) palloc0(sizeof(CopyOutStateData));
copyOutState->delim = (char *) delimiterCharacter; copyOutState->delim = (char *) delimiterCharacter;

View File

@ -411,8 +411,8 @@ ReadFileIntoTupleStore(char *fileName, char *copyFormat, TupleDesc tupleDescript
copyOptions = lappend(copyOptions, copyOption); copyOptions = lappend(copyOptions, copyOption);
CopyFromState copyState = BeginCopyFrom_compat(NULL, stubRelation, NULL, CopyFromState copyState = BeginCopyFrom_compat(NULL, stubRelation, NULL,
fileName, false, NULL, fileName, false, NULL,
NULL, copyOptions); NULL, copyOptions);
while (true) while (true)
{ {

View File

@ -75,8 +75,12 @@ citus_unmark_object_distributed(PG_FUNCTION_ARGS)
{ {
ereport(ERROR, (errmsg("object still exists"), ereport(ERROR, (errmsg("object still exists"),
errdetail("the %s \"%s\" still exists", errdetail("the %s \"%s\" still exists",
getObjectTypeDescription_compat(&address, /* missingOk: */ false), getObjectTypeDescription_compat(&address,
getObjectIdentity_compat(&address, /* missingOk: */ false)),
/* missingOk: */ false),
getObjectIdentity_compat(&address,
/* missingOk: */ false)),
errhint("drop the object via a DROP command"))); errhint("drop the object via a DROP command")));
} }

View File

@ -31,7 +31,7 @@ BEGIN
* Citus extension, so we create that dependency here. * Citus extension, so we create that dependency here.
* We are not using: * We are not using:
* ALTER EXENSION citus DROP/CREATE AGGREGATE array_cat_agg * ALTER EXENSION citus DROP/CREATE AGGREGATE array_cat_agg
* because we don't have an easy way to check if the aggregate * because we don't have an easy way to check if the aggregate
* exists with anyarray type or anycompatiblearray type. * exists with anyarray type or anycompatiblearray type.
*/ */
INSERT INTO pg_depend INSERT INTO pg_depend

View File

@ -31,7 +31,7 @@ BEGIN
* Citus extension, so we create that dependency here. * Citus extension, so we create that dependency here.
* We are not using: * We are not using:
* ALTER EXENSION citus DROP/CREATE AGGREGATE array_cat_agg * ALTER EXENSION citus DROP/CREATE AGGREGATE array_cat_agg
* because we don't have an easy way to check if the aggregate * because we don't have an easy way to check if the aggregate
* exists with anyarray type or anycompatiblearray type. * exists with anyarray type or anycompatiblearray type.
*/ */
INSERT INTO pg_depend INSERT INTO pg_depend

View File

@ -50,7 +50,7 @@ FunctionOidExtended(const char *schemaName, const char *functionName, int argume
argumentCount, argumentCount,
argumentList, argumentList,
findVariadics, findVariadics,
findDefaults, findDefaults,
false, false,
true); true);

View File

@ -63,7 +63,7 @@ typedef struct DDLJob
} DDLJob; } DDLJob;
extern void multi_ProcessUtility(PlannedStmt *pstmt, const char *queryString, extern void multi_ProcessUtility(PlannedStmt * pstmt, const char *queryString,
#if PG_VERSION_NUM >= PG_VERSION_14 #if PG_VERSION_NUM >= PG_VERSION_14
bool readOnlyTree, bool readOnlyTree,
#endif #endif

View File

@ -243,4 +243,4 @@ clean distclean maintainer-clean:
rm -f $(output_files) $(input_files) rm -f $(output_files) $(input_files)
rm -rf tmp_check/ rm -rf tmp_check/
all: create-tablespaces all: create-tablespaces

View File

@ -20,4 +20,5 @@
/multi_mx_copy_data.out /multi_mx_copy_data.out
/multi_outer_join.out /multi_outer_join.out
/multi_outer_join_reference.out /multi_outer_join_reference.out
/tablespace.out
/worker_copy.out /worker_copy.out

View File

@ -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';

View File

@ -2,4 +2,4 @@ CREATE TABLESPACE test_tablespace LOCATION '@abs_srcdir@/data/ts0';
\c - - - :worker_1_port \c - - - :worker_1_port
CREATE TABLESPACE test_tablespace LOCATION '@abs_srcdir@/data/ts1'; CREATE TABLESPACE test_tablespace LOCATION '@abs_srcdir@/data/ts1';
\c - - - :worker_2_port \c - - - :worker_2_port
CREATE TABLESPACE test_tablespace LOCATION '@abs_srcdir@/data/ts2'; CREATE TABLESPACE test_tablespace LOCATION '@abs_srcdir@/data/ts2';

View File

@ -20,4 +20,5 @@
/multi_mx_copy_data.sql /multi_mx_copy_data.sql
/multi_outer_join.sql /multi_outer_join.sql
/multi_outer_join_reference.sql /multi_outer_join_reference.sql
/tablespace.sql
/worker_copy.sql /worker_copy.sql

View File

@ -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';