mirror of https://github.com/citusdata/citus.git
Grammar: it's to its (#6527)
Includes an error message & one case of its to it's Also fix "to the to" typospull/6524/head
commit
617cac4024
|
@ -250,7 +250,7 @@ ErrorIfAnyPartitionRelationInvolvedInNonInheritedFKey(List *relationIdList)
|
|||
generate_qualified_relation_name(relationId);
|
||||
ereport(ERROR, (errmsg("cannot cascade operation via foreign keys as "
|
||||
"partition table %s involved in a foreign key "
|
||||
"relationship that is not inherited from it's "
|
||||
"relationship that is not inherited from its "
|
||||
"parent table", partitionRelationQualifiedName),
|
||||
errhint("Remove non-inherited foreign keys from %s and "
|
||||
"try operation again", partitionRelationQualifiedName)));
|
||||
|
|
|
@ -1030,7 +1030,7 @@ ConstraintIsAForeignKey(char *inputConstaintName, Oid relationId)
|
|||
/*
|
||||
* ConstraintWithNameIsOfType is a wrapper around get_relation_constraint_oid that
|
||||
* returns true if given constraint name identifies a valid constraint defined
|
||||
* on relation with relationId and it's type matches the input constraint type.
|
||||
* on relation with relationId and its type matches the input constraint type.
|
||||
*/
|
||||
bool
|
||||
ConstraintWithNameIsOfType(char *inputConstaintName, Oid relationId,
|
||||
|
|
|
@ -1932,7 +1932,7 @@ EnsureExtensionFunctionCanBeDistributed(const ObjectAddress functionAddress,
|
|||
/*
|
||||
* Citus extension is a special case. It's the extension that
|
||||
* provides the 'distributed capabilities' in the first place.
|
||||
* Trying to distribute it's own function(s) doesn't make sense.
|
||||
* Trying to distribute its own function(s) doesn't make sense.
|
||||
*/
|
||||
ereport(ERROR, (errmsg("Citus extension functions(%s) "
|
||||
"cannot be distributed.",
|
||||
|
|
|
@ -921,7 +921,7 @@ PreprocessCreateRoleStmt(Node *node, const char *queryString,
|
|||
commands = lappend(commands, DISABLE_DDL_PROPAGATION);
|
||||
commands = lappend(commands, createOrAlterRoleQuery);
|
||||
|
||||
/* deparse all grant statements and add them to the to commands list */
|
||||
/* deparse all grant statements and add them to the commands list */
|
||||
Node *stmt = NULL;
|
||||
foreach_ptr(stmt, grantRoleStmts)
|
||||
{
|
||||
|
|
|
@ -1076,7 +1076,7 @@ FilterDistributedSequences(GrantStmt *stmt)
|
|||
|
||||
/*
|
||||
* RenameExistingSequenceWithDifferentTypeIfExists renames the sequence's type if
|
||||
* that sequence exists and the desired sequence type is different than it's type.
|
||||
* that sequence exists and the desired sequence type is different than its type.
|
||||
*/
|
||||
void
|
||||
RenameExistingSequenceWithDifferentTypeIfExists(RangeVar *sequence, Oid desiredSeqTypeId)
|
||||
|
|
|
@ -1818,7 +1818,7 @@ FindCoordinatorNodeId()
|
|||
|
||||
/*
|
||||
* ReadDistNode iterates over pg_dist_node table, converts each row
|
||||
* into it's memory representation (i.e., WorkerNode) and adds them into
|
||||
* into its memory representation (i.e., WorkerNode) and adds them into
|
||||
* a list. Lastly, the list is returned to the caller.
|
||||
*
|
||||
* It skips nodes which are not in the current clusters unless requested to do otherwise
|
||||
|
@ -1847,7 +1847,7 @@ ReadDistNode(bool includeNodesFromOtherClusters)
|
|||
if (includeNodesFromOtherClusters ||
|
||||
strncmp(workerNode->nodeCluster, CurrentCluster, WORKER_LENGTH) == 0)
|
||||
{
|
||||
/* the coordinator acts as if it never sees nodes not in it's cluster */
|
||||
/* the coordinator acts as if it never sees nodes not in its cluster */
|
||||
workerNodeList = lappend(workerNodeList, workerNode);
|
||||
}
|
||||
|
||||
|
|
|
@ -186,7 +186,7 @@ distributed_planner(Query *parse,
|
|||
if (needsDistributedPlanning)
|
||||
{
|
||||
/*
|
||||
* standard_planner scribbles on it's input, but for deparsing we need the
|
||||
* standard_planner scribbles on its input, but for deparsing we need the
|
||||
* unmodified form. Before copying we call AssignRTEIdentities to be able
|
||||
* to match RTEs in the rewritten query tree with those in the original
|
||||
* tree.
|
||||
|
|
|
@ -424,7 +424,7 @@ StoreAllActiveTransactions(Tuplestorestate *tupleStore, TupleDesc tupleDescripto
|
|||
|
||||
/*
|
||||
* We prefer to use worker_query instead of distributedCommandOriginator in
|
||||
* the user facing functions since its more intuitive. Thus,
|
||||
* the user facing functions since it's more intuitive. Thus,
|
||||
* we negate the result before returning.
|
||||
*/
|
||||
bool distributedCommandOriginator =
|
||||
|
|
|
@ -356,14 +356,14 @@ FindShardIntervalIndex(Datum searchedValue, CitusTableCacheEntry *cacheEntry)
|
|||
|
||||
/*
|
||||
* SearchCachedShardInterval performs a binary search for a shard interval
|
||||
* matching a given partition column value and returns it's index in the cached
|
||||
* matching a given partition column value and returns its index in the cached
|
||||
* array. If it can not find any shard interval with the given value, it returns
|
||||
* INVALID_SHARD_INDEX.
|
||||
*
|
||||
* TODO: Data re-partitioning logic (worker_partition_query_resul))
|
||||
* on the worker nodes relies on this function in order to be consistent
|
||||
* with shard pruning. Since the worker nodes don't have the metadata, a
|
||||
* synthetically generated ShardInterval ** is passed to the to this
|
||||
* synthetically generated ShardInterval ** is passed to this
|
||||
* function. The synthetic shard intervals contain only shardmin and shardmax
|
||||
* values. A proper implementation of this approach should be introducing an
|
||||
* intermediate data structure (e.g., ShardRange) on which this function
|
||||
|
|
|
@ -161,7 +161,7 @@ worker_apply_sequence_command(PG_FUNCTION_ARGS)
|
|||
/*
|
||||
* If sequence with the same name exist for different type, it must have been
|
||||
* stayed on that node after a rollbacked create_distributed_table operation.
|
||||
* We must change it's name first to create the sequence with the correct type.
|
||||
* We must change its name first to create the sequence with the correct type.
|
||||
*/
|
||||
CreateSeqStmt *createSequenceStatement = (CreateSeqStmt *) commandNode;
|
||||
RenameExistingSequenceWithDifferentTypeIfExists(createSequenceStatement->sequence,
|
||||
|
|
|
@ -386,9 +386,9 @@ SELECT citus_add_local_table_to_metadata('cas_par2_2', cascade_via_foreign_keys=
|
|||
ERROR: cannot add local table cas_par2_2 to metadata since it is a partition of cas_par2. Instead, add the parent table cas_par2 to metadata.
|
||||
-- these two should error out as the foreign keys are not inherited from the parent
|
||||
SELECT citus_add_local_table_to_metadata('cas_par2');
|
||||
ERROR: cannot cascade operation via foreign keys as partition table citus_local_tables_mx.cas_par2_1 involved in a foreign key relationship that is not inherited from it's parent table
|
||||
ERROR: cannot cascade operation via foreign keys as partition table citus_local_tables_mx.cas_par2_1 involved in a foreign key relationship that is not inherited from its parent table
|
||||
SELECT citus_add_local_table_to_metadata('cas_par2', cascade_via_foreign_keys=>true);
|
||||
ERROR: cannot cascade operation via foreign keys as partition table citus_local_tables_mx.cas_par2_1 involved in a foreign key relationship that is not inherited from it's parent table
|
||||
ERROR: cannot cascade operation via foreign keys as partition table citus_local_tables_mx.cas_par2_1 involved in a foreign key relationship that is not inherited from its parent table
|
||||
-- drop the foreign keys and establish them again using the parent table
|
||||
ALTER TABLE cas_par_1 DROP CONSTRAINT fkey_cas_test_1;
|
||||
ALTER TABLE cas_par2_1 DROP CONSTRAINT fkey_cas_test_2;
|
||||
|
@ -511,7 +511,7 @@ select conname from pg_constraint where conname like 'fkey_cas_test%' order by c
|
|||
-- add a non-inherited fkey and verify it fails when trying to convert
|
||||
ALTER TABLE cas_par2_1 ADD CONSTRAINT fkey_cas_test_3 FOREIGN KEY (a) REFERENCES cas_1(a);
|
||||
SELECT citus_add_local_table_to_metadata('cas_par2', cascade_via_foreign_keys=>true);
|
||||
ERROR: cannot cascade operation via foreign keys as partition table citus_local_tables_mx.cas_par2_1 involved in a foreign key relationship that is not inherited from it's parent table
|
||||
ERROR: cannot cascade operation via foreign keys as partition table citus_local_tables_mx.cas_par2_1 involved in a foreign key relationship that is not inherited from its parent table
|
||||
-- verify undistribute_table works proper for the mx worker
|
||||
\c - - - :worker_1_port
|
||||
SELECT relname FROM pg_class WHERE relname LIKE 'cas\_%' ORDER BY relname;
|
||||
|
|
|
@ -81,7 +81,7 @@ SELECT columnar_test_helpers.pg_waitpid(val) FROM old_backend_pid;
|
|||
(1 row)
|
||||
|
||||
DROP TABLE old_backend_pid;
|
||||
-- show that temporary table itself and it's metadata is removed
|
||||
-- show that temporary table itself and its metadata is removed
|
||||
SELECT COUNT(*)=0 FROM pg_class WHERE relname='columnar_temp';
|
||||
?column?
|
||||
---------------------------------------------------------------------
|
||||
|
@ -140,7 +140,7 @@ BEGIN;
|
|||
SELECT columnar.get_storage_id(oid) AS columnar_temp_storage_id
|
||||
FROM pg_class WHERE relname='columnar_temp' \gset
|
||||
COMMIT;
|
||||
-- make sure that table & it's stripe is dropped after commiting above xact
|
||||
-- make sure that table & its stripe is dropped after commiting above xact
|
||||
SELECT COUNT(*)=0 FROM pg_class WHERE relname='columnar_temp';
|
||||
?column?
|
||||
---------------------------------------------------------------------
|
||||
|
@ -160,7 +160,7 @@ BEGIN;
|
|||
SELECT columnar.get_storage_id(oid) AS columnar_temp_storage_id
|
||||
FROM pg_class WHERE relname='columnar_temp' \gset
|
||||
COMMIT;
|
||||
-- make sure that table is not dropped but it's rows's are deleted after commiting above xact
|
||||
-- make sure that table is not dropped but its rows's are deleted after commiting above xact
|
||||
SELECT COUNT(*)=1 FROM pg_class WHERE relname='columnar_temp';
|
||||
?column?
|
||||
---------------------------------------------------------------------
|
||||
|
|
|
@ -535,7 +535,7 @@ SHOW citus.multi_shard_modify_mode;
|
|||
|
||||
COMMIT;
|
||||
-- Show that PG does not allow adding a circular dependency btw types
|
||||
-- We added here to make sure we can catch it if PG changes it's behaviour
|
||||
-- We added here to make sure we can catch it if PG changes its behaviour
|
||||
CREATE TYPE circ_type1 AS (a int);
|
||||
CREATE TYPE circ_type2 AS (a int, b circ_type1);
|
||||
ALTER TYPE circ_type1 ADD ATTRIBUTE b circ_type2;
|
||||
|
|
|
@ -312,7 +312,7 @@ BEGIN;
|
|||
set citus.multi_shard_modify_mode to 'sequential';
|
||||
ALTER TABLE partitioned_table_1_100_200 ADD CONSTRAINT fkey FOREIGN KEY(col_1) REFERENCES partitioned_table_1_100_200(col_1);
|
||||
SELECT undistribute_table('partitioned_table_1', true);
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_1_100_200 involved in a foreign key relationship that is not inherited from it's parent table
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_1_100_200 involved in a foreign key relationship that is not inherited from its parent table
|
||||
ROLLBACK;
|
||||
CREATE TABLE distributed_table_4 (col_1 INT UNIQUE, col_2 INT);
|
||||
SELECT create_distributed_table('distributed_table_4', 'col_1');
|
||||
|
@ -325,7 +325,7 @@ BEGIN;
|
|||
set citus.multi_shard_modify_mode to 'sequential';
|
||||
ALTER TABLE distributed_table_4 ADD CONSTRAINT fkey FOREIGN KEY(col_1) REFERENCES partitioned_table_1_100_200(col_1);
|
||||
SELECT undistribute_table('partitioned_table_1', true);
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_1_100_200 involved in a foreign key relationship that is not inherited from it's parent table
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_1_100_200 involved in a foreign key relationship that is not inherited from its parent table
|
||||
ROLLBACK;
|
||||
CREATE TABLE reference_table_3 (col_1 INT UNIQUE, col_2 INT UNIQUE);
|
||||
SELECT create_reference_table('reference_table_3');
|
||||
|
@ -384,91 +384,91 @@ BEGIN;
|
|||
set citus.multi_shard_modify_mode to 'sequential';
|
||||
ALTER TABLE partitioned_table_1_100_200 ADD CONSTRAINT non_inherited_fkey FOREIGN KEY(col_1) REFERENCES reference_table_3(col_1);
|
||||
SELECT undistribute_table('partitioned_table_2', cascade_via_foreign_keys=>true);
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_1_100_200 involved in a foreign key relationship that is not inherited from it's parent table
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_1_100_200 involved in a foreign key relationship that is not inherited from its parent table
|
||||
ROLLBACK;
|
||||
BEGIN;
|
||||
set citus.multi_shard_modify_mode to 'sequential';
|
||||
ALTER TABLE partitioned_table_1_100_200 ADD CONSTRAINT non_inherited_fkey FOREIGN KEY(col_1) REFERENCES reference_table_3(col_1);
|
||||
SELECT undistribute_table('partitioned_table_1', cascade_via_foreign_keys=>true);
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_1_100_200 involved in a foreign key relationship that is not inherited from it's parent table
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_1_100_200 involved in a foreign key relationship that is not inherited from its parent table
|
||||
ROLLBACK;
|
||||
BEGIN;
|
||||
set citus.multi_shard_modify_mode to 'sequential';
|
||||
ALTER TABLE partitioned_table_1_100_200 ADD CONSTRAINT non_inherited_fkey FOREIGN KEY(col_1) REFERENCES reference_table_3(col_1);
|
||||
SELECT undistribute_table('partitioned_table_2', cascade_via_foreign_keys=>true);
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_1_100_200 involved in a foreign key relationship that is not inherited from it's parent table
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_1_100_200 involved in a foreign key relationship that is not inherited from its parent table
|
||||
ROLLBACK;
|
||||
BEGIN;
|
||||
set citus.multi_shard_modify_mode to 'sequential';
|
||||
ALTER TABLE partitioned_table_1_100_200 ADD CONSTRAINT non_inherited_fkey FOREIGN KEY(col_1) REFERENCES partitioned_table_2_100_200(col_1);
|
||||
SELECT undistribute_table('partitioned_table_1', cascade_via_foreign_keys=>true);
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_1_100_200 involved in a foreign key relationship that is not inherited from it's parent table
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_1_100_200 involved in a foreign key relationship that is not inherited from its parent table
|
||||
ROLLBACK;
|
||||
BEGIN;
|
||||
set citus.multi_shard_modify_mode to 'sequential';
|
||||
ALTER TABLE partitioned_table_1_100_200 ADD CONSTRAINT non_inherited_fkey FOREIGN KEY(col_1) REFERENCES partitioned_table_2_100_200(col_1);
|
||||
SELECT undistribute_table('partitioned_table_2', cascade_via_foreign_keys=>true);
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_2_100_200 involved in a foreign key relationship that is not inherited from it's parent table
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_2_100_200 involved in a foreign key relationship that is not inherited from its parent table
|
||||
ROLLBACK;
|
||||
BEGIN;
|
||||
set citus.multi_shard_modify_mode to 'sequential';
|
||||
ALTER TABLE distributed_table_4 ADD CONSTRAINT non_inherited_fkey FOREIGN KEY (col_1) REFERENCES partitioned_table_2_100_200(col_1);
|
||||
SELECT undistribute_table('distributed_table_4', cascade_via_foreign_keys=>true);
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_2_100_200 involved in a foreign key relationship that is not inherited from it's parent table
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_2_100_200 involved in a foreign key relationship that is not inherited from its parent table
|
||||
ROLLBACK;
|
||||
BEGIN;
|
||||
set citus.multi_shard_modify_mode to 'sequential';
|
||||
ALTER TABLE distributed_table_4 ADD CONSTRAINT non_inherited_fkey FOREIGN KEY (col_1) REFERENCES partitioned_table_1_100_200(col_1);
|
||||
SELECT undistribute_table('partitioned_table_1', cascade_via_foreign_keys=>true);
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_1_100_200 involved in a foreign key relationship that is not inherited from it's parent table
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_1_100_200 involved in a foreign key relationship that is not inherited from its parent table
|
||||
ROLLBACK;
|
||||
BEGIN;
|
||||
set citus.multi_shard_modify_mode to 'sequential';
|
||||
ALTER TABLE distributed_table_4 ADD CONSTRAINT non_inherited_fkey FOREIGN KEY (col_1) REFERENCES partitioned_table_1_100_200(col_1);
|
||||
SELECT undistribute_table('partitioned_table_2', cascade_via_foreign_keys=>true);
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_1_100_200 involved in a foreign key relationship that is not inherited from it's parent table
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_1_100_200 involved in a foreign key relationship that is not inherited from its parent table
|
||||
ROLLBACK;
|
||||
BEGIN;
|
||||
set citus.multi_shard_modify_mode to 'sequential';
|
||||
ALTER TABLE partitioned_table_1_100_200 ADD CONSTRAINT fkey FOREIGN KEY(col_1) REFERENCES distributed_table_4(col_1);
|
||||
SELECT undistribute_table('partitioned_table_1', cascade_via_foreign_keys=>true);
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_1_100_200 involved in a foreign key relationship that is not inherited from it's parent table
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_1_100_200 involved in a foreign key relationship that is not inherited from its parent table
|
||||
ROLLBACK;
|
||||
BEGIN;
|
||||
set citus.multi_shard_modify_mode to 'sequential';
|
||||
ALTER TABLE partitioned_table_1_100_200 ADD CONSTRAINT fkey FOREIGN KEY(col_1) REFERENCES distributed_table_4(col_1);
|
||||
SELECT undistribute_table('partitioned_table_2', cascade_via_foreign_keys=>true);
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_1_100_200 involved in a foreign key relationship that is not inherited from it's parent table
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_1_100_200 involved in a foreign key relationship that is not inherited from its parent table
|
||||
ROLLBACK;
|
||||
BEGIN;
|
||||
set citus.multi_shard_modify_mode to 'sequential';
|
||||
ALTER TABLE partitioned_table_1_100_200 ADD CONSTRAINT fkey FOREIGN KEY(col_1) REFERENCES distributed_table_4(col_1);
|
||||
SELECT undistribute_table('distributed_table_4', cascade_via_foreign_keys=>true);
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_1_100_200 involved in a foreign key relationship that is not inherited from it's parent table
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_1_100_200 involved in a foreign key relationship that is not inherited from its parent table
|
||||
ROLLBACK;
|
||||
BEGIN;
|
||||
set citus.multi_shard_modify_mode to 'sequential';
|
||||
ALTER TABLE partitioned_table_2 ADD CONSTRAINT fkey FOREIGN KEY (col_1) REFERENCES partitioned_table_1_100_200(col_1);
|
||||
SELECT undistribute_table('partitioned_table_2', cascade_via_foreign_keys=>true);
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_1_100_200 involved in a foreign key relationship that is not inherited from it's parent table
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_1_100_200 involved in a foreign key relationship that is not inherited from its parent table
|
||||
ROLLBACK;
|
||||
BEGIN;
|
||||
set citus.multi_shard_modify_mode to 'sequential';
|
||||
ALTER TABLE partitioned_table_2_100_200 ADD CONSTRAINT non_inherited_fkey FOREIGN KEY (col_1) REFERENCES partitioned_table_2_100_200(col_1);
|
||||
SELECT undistribute_table('reference_table_3', cascade_via_foreign_keys=>true);
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_2_100_200 involved in a foreign key relationship that is not inherited from it's parent table
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_2_100_200 involved in a foreign key relationship that is not inherited from its parent table
|
||||
ROLLBACK;
|
||||
BEGIN;
|
||||
set citus.multi_shard_modify_mode to 'sequential';
|
||||
ALTER TABLE partitioned_table_2_100_200 ADD CONSTRAINT non_inherited_fkey FOREIGN KEY (col_1) REFERENCES partitioned_table_2_100_200(col_1);
|
||||
SELECT undistribute_table('partitioned_table_2', cascade_via_foreign_keys=>true);
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_2_100_200 involved in a foreign key relationship that is not inherited from it's parent table
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_2_100_200 involved in a foreign key relationship that is not inherited from its parent table
|
||||
ROLLBACK;
|
||||
BEGIN;
|
||||
set citus.multi_shard_modify_mode to 'sequential';
|
||||
ALTER TABLE partitioned_table_2_100_200 ADD CONSTRAINT non_inherited_fkey FOREIGN KEY (col_1) REFERENCES partitioned_table_2_100_200(col_1);
|
||||
SELECT undistribute_table('partitioned_table_1', cascade_via_foreign_keys=>true);
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_2_100_200 involved in a foreign key relationship that is not inherited from it's parent table
|
||||
ERROR: cannot cascade operation via foreign keys as partition table undistribute_table_cascade.partitioned_table_2_100_200 involved in a foreign key relationship that is not inherited from its parent table
|
||||
ROLLBACK;
|
||||
ALTER TABLE partitioned_table_1 ADD CONSTRAINT fkey_13 FOREIGN KEY (col_1) REFERENCES partitioned_table_2(col_1);
|
||||
BEGIN;
|
||||
|
|
|
@ -72,7 +72,7 @@ SELECT columnar_test_helpers.pg_waitpid(val) FROM old_backend_pid;
|
|||
|
||||
DROP TABLE old_backend_pid;
|
||||
|
||||
-- show that temporary table itself and it's metadata is removed
|
||||
-- show that temporary table itself and its metadata is removed
|
||||
SELECT COUNT(*)=0 FROM pg_class WHERE relname='columnar_temp';
|
||||
SELECT columnar_test_helpers.columnar_metadata_has_storage_id(:columnar_temp_storage_id);
|
||||
|
||||
|
@ -111,7 +111,7 @@ BEGIN;
|
|||
FROM pg_class WHERE relname='columnar_temp' \gset
|
||||
COMMIT;
|
||||
|
||||
-- make sure that table & it's stripe is dropped after commiting above xact
|
||||
-- make sure that table & its stripe is dropped after commiting above xact
|
||||
SELECT COUNT(*)=0 FROM pg_class WHERE relname='columnar_temp';
|
||||
SELECT columnar_test_helpers.columnar_metadata_has_storage_id(:columnar_temp_storage_id);
|
||||
|
||||
|
@ -124,7 +124,7 @@ BEGIN;
|
|||
FROM pg_class WHERE relname='columnar_temp' \gset
|
||||
COMMIT;
|
||||
|
||||
-- make sure that table is not dropped but it's rows's are deleted after commiting above xact
|
||||
-- make sure that table is not dropped but its rows's are deleted after commiting above xact
|
||||
SELECT COUNT(*)=1 FROM pg_class WHERE relname='columnar_temp';
|
||||
SELECT COUNT(*)=0 FROM columnar_temp;
|
||||
-- since we deleted all the rows, we shouldn't have any stripes for table
|
||||
|
|
|
@ -316,7 +316,7 @@ SHOW citus.multi_shard_modify_mode;
|
|||
COMMIT;
|
||||
|
||||
-- Show that PG does not allow adding a circular dependency btw types
|
||||
-- We added here to make sure we can catch it if PG changes it's behaviour
|
||||
-- We added here to make sure we can catch it if PG changes its behaviour
|
||||
CREATE TYPE circ_type1 AS (a int);
|
||||
CREATE TYPE circ_type2 AS (a int, b circ_type1);
|
||||
ALTER TYPE circ_type1 ADD ATTRIBUTE b circ_type2;
|
||||
|
|
Loading…
Reference in New Issue