You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# A scalar subquery with no home region should fail.
397
397
retry
398
-
statement error pq: Query has no home region\. Try adding a filter on rbr\.crdb_region and/or on key column \(rbr\.account_id\)\. For more information, see https://www.cockroachlabs.com/docs/stable/cost-based-optimizer.html#control-whether-queries-are-limited-to-a-single-region
398
+
statement error pq: Query has no home region. Try adding a LIMIT clause. For more information, see https://www.cockroachlabs.com/docs/stable/cost-based-optimizer.html#control-whether-queries-are-limited-to-a-single-region
399
399
SELECT * FROM (SELECT (SELECT max(account_id) FROM messages_rbr rbr), 'Hello, Dude!') vtab(account_id, message)
400
400
INNER LOOKUP JOIN messages_rbt rbt on vtab.account_id = rbt.account_id
401
401
@@ -416,7 +416,7 @@ CREATE OR REPLACE FUNCTION rbr() RETURNS INT AS 'SELECT max(account_id) FROM mes
416
416
417
417
# A UDF with no home region should fail.
418
418
retry
419
-
statement error pq: Query has no home region\. Try adding a filter on messages_rbr\.crdb_region and/or on key column \(multi_region_test_db\.public\.messages_rbr\.account_id\)\. For more information, see https://www.cockroachlabs.com/docs/stable/cost-based-optimizer.html#control-whether-queries-are-limited-to-a-single-region
419
+
statement error pq: Query has no home region. Try adding a LIMIT clause. For more information, see https://www.cockroachlabs.com/docs/stable/cost-based-optimizer.html#control-whether-queries-are-limited-to-a-single-region
420
420
SELECT rbr()
421
421
422
422
# An EXISTS subquery with no home region should fail.
@@ -440,22 +440,22 @@ SELECT * FROM messages_rbr rbr, LATERAL
440
440
441
441
# An array scalar expression with no home region should fail.
442
442
retry
443
-
statement error pq: Query has no home region\. Try adding a filter on messages_rbr\.crdb_region and/or on key column \(multi_region_test_db\.public\.messages_rbr\.account_id\)\. For more information, see https://www.cockroachlabs.com/docs/stable/cost-based-optimizer.html#control-whether-queries-are-limited-to-a-single-region
443
+
statement error pq: Query has no home region. Try adding a LIMIT clause. For more information, see https://www.cockroachlabs.com/docs/stable/cost-based-optimizer.html#control-whether-queries-are-limited-to-a-single-region
444
444
SELECT ARRAY[rbr(),rbr()]
445
445
446
446
# An ALL subquery with no home region should fail.
447
447
retry
448
-
statement error pq: Query has no home region\. Try adding a filter on messages_rbr\.crdb_region and/or on key column \(messages_rbr\.account_id\)\. For more information, see https://www.cockroachlabs.com/docs/stable/cost-based-optimizer.html#control-whether-queries-are-limited-to-a-single-region
448
+
statement error pq: Query has no home region. Try adding a LIMIT clause. For more information, see https://www.cockroachlabs.com/docs/stable/cost-based-optimizer.html#control-whether-queries-are-limited-to-a-single-region
449
449
SELECT 1 WHERE 1 > ALL (SELECT max(account_id) FROM messages_rbr)
450
450
451
451
# An ANY subquery with no home region should fail.
452
452
retry
453
-
statement error pq: Query has no home region\. Try adding a filter on messages_rbr\.crdb_region and/or on key column \(messages_rbr\.account_id\)\. For more information, see https://www.cockroachlabs.com/docs/stable/cost-based-optimizer.html#control-whether-queries-are-limited-to-a-single-region
453
+
statement error pq: Query has no home region. Try adding a LIMIT clause. For more information, see https://www.cockroachlabs.com/docs/stable/cost-based-optimizer.html#control-whether-queries-are-limited-to-a-single-region
454
454
SELECT 1 WHERE 1 > ANY (SELECT max(account_id) FROM messages_rbr)
455
455
456
456
# A SOME subquery with no home region should fail.
457
457
retry
458
-
statement error pq: Query has no home region\. Try adding a filter on messages_rbr\.crdb_region and/or on key column \(messages_rbr\.account_id\)\. For more information, see https://www.cockroachlabs.com/docs/stable/cost-based-optimizer.html#control-whether-queries-are-limited-to-a-single-region
458
+
statement error pq: Query has no home region. Try adding a LIMIT clause. For more information, see https://www.cockroachlabs.com/docs/stable/cost-based-optimizer.html#control-whether-queries-are-limited-to-a-single-region
459
459
SELECT 1 WHERE 1 > ANY (SELECT max(account_id) FROM messages_rbr)
0 commit comments