mirror of https://github.com/citusdata/citus.git
Fix strange errors in DML with unreachable sublinks (#3263)
Fix strange errors in DML with unreachable sublinkspull/3272/head
commit
b0ac70f1f4
|
@ -640,7 +640,7 @@ ModifyQuerySupported(Query *queryTree, Query *originalQuery, bool multiShardQuer
|
||||||
}
|
}
|
||||||
|
|
||||||
/* extract range table entries */
|
/* extract range table entries */
|
||||||
ExtractRangeTableEntryWalker((Node *) queryTree, &rangeTableList);
|
ExtractRangeTableEntryWalker((Node *) originalQuery, &rangeTableList);
|
||||||
|
|
||||||
foreach(rangeTableCell, rangeTableList)
|
foreach(rangeTableCell, rangeTableList)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1285,6 +1285,18 @@ HINT: Try rewriting your queries with 'INSERT INTO ... SELECT' syntax.
|
||||||
INSERT INTO summary_table (id) VALUES ((SELECT id FROM reference_summary_table));
|
INSERT INTO summary_table (id) VALUES ((SELECT id FROM reference_summary_table));
|
||||||
ERROR: subqueries are not supported within INSERT queries
|
ERROR: subqueries are not supported within INSERT queries
|
||||||
HINT: Try rewriting your queries with 'INSERT INTO ... SELECT' syntax.
|
HINT: Try rewriting your queries with 'INSERT INTO ... SELECT' syntax.
|
||||||
|
-- subqueries that would be eliminated by = null clauses
|
||||||
|
DELETE FROM summary_table WHERE (
|
||||||
|
SELECT 1 FROM pg_catalog.pg_statio_sys_sequences
|
||||||
|
) = null;
|
||||||
|
DELETE FROM summary_table WHERE (
|
||||||
|
SELECT (select action_statement from information_schema.triggers)
|
||||||
|
FROM pg_catalog.pg_statio_sys_sequences
|
||||||
|
) = null;
|
||||||
|
ERROR: relation pg_namespace is not distributed
|
||||||
|
DELETE FROM summary_table WHERE id < (
|
||||||
|
SELECT 0 FROM pg_dist_node
|
||||||
|
);
|
||||||
DROP TABLE raw_table;
|
DROP TABLE raw_table;
|
||||||
DROP TABLE summary_table;
|
DROP TABLE summary_table;
|
||||||
DROP TABLE reference_raw_table;
|
DROP TABLE reference_raw_table;
|
||||||
|
|
|
@ -858,6 +858,19 @@ INSERT INTO summary_table (id) VALUES (5), ((SELECT id FROM summary_table));
|
||||||
INSERT INTO reference_summary_table (id) VALUES ((SELECT id FROM summary_table));
|
INSERT INTO reference_summary_table (id) VALUES ((SELECT id FROM summary_table));
|
||||||
INSERT INTO summary_table (id) VALUES ((SELECT id FROM reference_summary_table));
|
INSERT INTO summary_table (id) VALUES ((SELECT id FROM reference_summary_table));
|
||||||
|
|
||||||
|
-- subqueries that would be eliminated by = null clauses
|
||||||
|
DELETE FROM summary_table WHERE (
|
||||||
|
SELECT 1 FROM pg_catalog.pg_statio_sys_sequences
|
||||||
|
) = null;
|
||||||
|
DELETE FROM summary_table WHERE (
|
||||||
|
SELECT (select action_statement from information_schema.triggers)
|
||||||
|
FROM pg_catalog.pg_statio_sys_sequences
|
||||||
|
) = null;
|
||||||
|
|
||||||
|
DELETE FROM summary_table WHERE id < (
|
||||||
|
SELECT 0 FROM pg_dist_node
|
||||||
|
);
|
||||||
|
|
||||||
DROP TABLE raw_table;
|
DROP TABLE raw_table;
|
||||||
DROP TABLE summary_table;
|
DROP TABLE summary_table;
|
||||||
DROP TABLE reference_raw_table;
|
DROP TABLE reference_raw_table;
|
||||||
|
|
Loading…
Reference in New Issue