mirror of https://github.com/citusdata/citus.git
Merge pull request #1431 from jmunsch/jmunsch_errmsg
Update to errmsg for mixed location insert intopull/1434/head
commit
a7c94cb36d
|
@ -2682,11 +2682,10 @@ NeedsDistributedPlanning(Query *queryTree)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* users can't mix local and distributed relations in one query */
|
|
||||||
if (hasLocalRelation && hasDistributedRelation)
|
if (hasLocalRelation && hasDistributedRelation)
|
||||||
{
|
{
|
||||||
ereport(ERROR, (errmsg("cannot plan queries that include both regular and "
|
ereport(ERROR, (errmsg("cannot plan queries which include both local and "
|
||||||
"partitioned relations")));
|
"distributed relations")));
|
||||||
}
|
}
|
||||||
|
|
||||||
return hasDistributedRelation;
|
return hasDistributedRelation;
|
||||||
|
|
|
@ -264,7 +264,7 @@ CREATE TABLE bidders ( name text, id bigint );
|
||||||
DELETE FROM limit_orders USING bidders WHERE limit_orders.id = 246 AND
|
DELETE FROM limit_orders USING bidders WHERE limit_orders.id = 246 AND
|
||||||
limit_orders.bidder_id = bidders.id AND
|
limit_orders.bidder_id = bidders.id AND
|
||||||
bidders.name = 'Bernie Madoff';
|
bidders.name = 'Bernie Madoff';
|
||||||
ERROR: cannot plan queries that include both regular and partitioned relations
|
ERROR: cannot plan queries which include both local and distributed relations
|
||||||
-- commands containing a CTE are unsupported
|
-- commands containing a CTE are unsupported
|
||||||
WITH deleted_orders AS (INSERT INTO limit_orders DEFAULT VALUES RETURNING *)
|
WITH deleted_orders AS (INSERT INTO limit_orders DEFAULT VALUES RETURNING *)
|
||||||
DELETE FROM limit_orders;
|
DELETE FROM limit_orders;
|
||||||
|
@ -407,7 +407,7 @@ UPDATE limit_orders SET limit_price = 0.00 FROM bidders
|
||||||
WHERE limit_orders.id = 246 AND
|
WHERE limit_orders.id = 246 AND
|
||||||
limit_orders.bidder_id = bidders.id AND
|
limit_orders.bidder_id = bidders.id AND
|
||||||
bidders.name = 'Bernie Madoff';
|
bidders.name = 'Bernie Madoff';
|
||||||
ERROR: cannot plan queries that include both regular and partitioned relations
|
ERROR: cannot plan queries which include both local and distributed relations
|
||||||
-- commands containing a CTE are unsupported
|
-- commands containing a CTE are unsupported
|
||||||
WITH deleted_orders AS (INSERT INTO limit_orders DEFAULT VALUES RETURNING *)
|
WITH deleted_orders AS (INSERT INTO limit_orders DEFAULT VALUES RETURNING *)
|
||||||
UPDATE limit_orders SET symbol = 'GM';
|
UPDATE limit_orders SET symbol = 'GM';
|
||||||
|
|
|
@ -170,7 +170,7 @@ CREATE TABLE bidders ( name text, id bigint );
|
||||||
DELETE FROM limit_orders_mx USING bidders WHERE limit_orders_mx.id = 246 AND
|
DELETE FROM limit_orders_mx USING bidders WHERE limit_orders_mx.id = 246 AND
|
||||||
limit_orders_mx.bidder_id = bidders.id AND
|
limit_orders_mx.bidder_id = bidders.id AND
|
||||||
bidders.name = 'Bernie Madoff';
|
bidders.name = 'Bernie Madoff';
|
||||||
ERROR: cannot plan queries that include both regular and partitioned relations
|
ERROR: cannot plan queries which include both local and distributed relations
|
||||||
-- commands containing a CTE are unsupported
|
-- commands containing a CTE are unsupported
|
||||||
WITH deleted_orders AS (INSERT INTO limit_orders_mx DEFAULT VALUES RETURNING *)
|
WITH deleted_orders AS (INSERT INTO limit_orders_mx DEFAULT VALUES RETURNING *)
|
||||||
DELETE FROM limit_orders_mx;
|
DELETE FROM limit_orders_mx;
|
||||||
|
@ -243,7 +243,7 @@ UPDATE limit_orders_mx SET limit_price = 0.00 FROM bidders
|
||||||
WHERE limit_orders_mx.id = 246 AND
|
WHERE limit_orders_mx.id = 246 AND
|
||||||
limit_orders_mx.bidder_id = bidders.id AND
|
limit_orders_mx.bidder_id = bidders.id AND
|
||||||
bidders.name = 'Bernie Madoff';
|
bidders.name = 'Bernie Madoff';
|
||||||
ERROR: cannot plan queries that include both regular and partitioned relations
|
ERROR: cannot plan queries which include both local and distributed relations
|
||||||
-- commands containing a CTE are unsupported
|
-- commands containing a CTE are unsupported
|
||||||
WITH deleted_orders AS (INSERT INTO limit_orders_mx DEFAULT VALUES RETURNING *)
|
WITH deleted_orders AS (INSERT INTO limit_orders_mx DEFAULT VALUES RETURNING *)
|
||||||
UPDATE limit_orders_mx SET symbol = 'GM';
|
UPDATE limit_orders_mx SET symbol = 'GM';
|
||||||
|
|
|
@ -178,14 +178,14 @@ HINT: Consider using an equality filter on the distributed table's partition co
|
||||||
-- queries using CTEs are unsupported
|
-- queries using CTEs are unsupported
|
||||||
WITH long_names AS ( SELECT id FROM authors WHERE char_length(name) > 15 )
|
WITH long_names AS ( SELECT id FROM authors WHERE char_length(name) > 15 )
|
||||||
SELECT title FROM articles;
|
SELECT title FROM articles;
|
||||||
ERROR: cannot plan queries that include both regular and partitioned relations
|
ERROR: cannot plan queries which include both local and distributed relations
|
||||||
-- queries which involve functions in FROM clause are unsupported.
|
-- queries which involve functions in FROM clause are unsupported.
|
||||||
SELECT * FROM articles, position('om' in 'Thomas');
|
SELECT * FROM articles, position('om' in 'Thomas');
|
||||||
ERROR: could not run distributed query with complex table expressions
|
ERROR: could not run distributed query with complex table expressions
|
||||||
HINT: Consider using an equality filter on the distributed table's partition column.
|
HINT: Consider using an equality filter on the distributed table's partition column.
|
||||||
-- subqueries are not supported in WHERE clause in Citus
|
-- subqueries are not supported in WHERE clause in Citus
|
||||||
SELECT * FROM articles WHERE author_id IN (SELECT id FROM authors WHERE name LIKE '%a');
|
SELECT * FROM articles WHERE author_id IN (SELECT id FROM authors WHERE name LIKE '%a');
|
||||||
ERROR: cannot plan queries that include both regular and partitioned relations
|
ERROR: cannot plan queries which include both local and distributed relations
|
||||||
-- subqueries are supported in FROM clause
|
-- subqueries are supported in FROM clause
|
||||||
SELECT articles.id,test.word_count
|
SELECT articles.id,test.word_count
|
||||||
FROM articles, (SELECT id, word_count FROM articles) AS test WHERE test.id = articles.id
|
FROM articles, (SELECT id, word_count FROM articles) AS test WHERE test.id = articles.id
|
||||||
|
@ -251,10 +251,10 @@ ERROR: could not run distributed query with subquery outside the FROM and WHERE
|
||||||
HINT: Consider using an equality filter on the distributed table's partition column.
|
HINT: Consider using an equality filter on the distributed table's partition column.
|
||||||
-- joins are not supported between local and distributed tables
|
-- joins are not supported between local and distributed tables
|
||||||
SELECT title, authors.name FROM authors, articles WHERE authors.id = articles.author_id;
|
SELECT title, authors.name FROM authors, articles WHERE authors.id = articles.author_id;
|
||||||
ERROR: cannot plan queries that include both regular and partitioned relations
|
ERROR: cannot plan queries which include both local and distributed relations
|
||||||
-- inner joins are not supported (I think)
|
-- inner joins are not supported (I think)
|
||||||
SELECT * FROM (articles INNER JOIN authors ON articles.id = authors.id);
|
SELECT * FROM (articles INNER JOIN authors ON articles.id = authors.id);
|
||||||
ERROR: cannot plan queries that include both regular and partitioned relations
|
ERROR: cannot plan queries which include both local and distributed relations
|
||||||
-- test use of EXECUTE statements within plpgsql
|
-- test use of EXECUTE statements within plpgsql
|
||||||
DO $sharded_execute$
|
DO $sharded_execute$
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
Loading…
Reference in New Issue