diff --git a/java/yb-pgsql/src/test/java/org/yb/pgsql/ExplainAnalyzeUtils.java b/java/yb-pgsql/src/test/java/org/yb/pgsql/ExplainAnalyzeUtils.java index 78bf0112a7c0..c38ef474f502 100644 --- a/java/yb-pgsql/src/test/java/org/yb/pgsql/ExplainAnalyzeUtils.java +++ b/java/yb-pgsql/src/test/java/org/yb/pgsql/ExplainAnalyzeUtils.java @@ -34,8 +34,8 @@ public class ExplainAnalyzeUtils { public static final String NODE_SEQ_SCAN = "Seq Scan"; public static final String NODE_SORT = "Sort"; public static final String NODE_VALUES_SCAN = "Values Scan"; + public static final String NODE_YB_BATCHED_NESTED_LOOP = "YB Batched Nested Loop"; - public static final String NODE_YB_SEQ_SCAN = "YB Seq Scan"; public static final String OPERATION_INSERT = "Insert"; public static final String OPERATION_UPDATE = "Update"; diff --git a/java/yb-pgsql/src/test/java/org/yb/pgsql/TestPgAutoExplain.java b/java/yb-pgsql/src/test/java/org/yb/pgsql/TestPgAutoExplain.java index 8b97cfe5496a..c9dd46400711 100644 --- a/java/yb-pgsql/src/test/java/org/yb/pgsql/TestPgAutoExplain.java +++ b/java/yb-pgsql/src/test/java/org/yb/pgsql/TestPgAutoExplain.java @@ -13,14 +13,6 @@ package org.yb.pgsql; import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_SEQ_SCAN; -import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_YB_SEQ_SCAN; -import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_INDEX_SCAN; -import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_INDEX_ONLY_SCAN; -import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_VALUES_SCAN; -import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_NESTED_LOOP; -import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_MODIFY_TABLE; -import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_FUNCTION_SCAN; -import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_RESULT; import static org.yb.AssertionWrappers.assertEquals; import static org.yb.AssertionWrappers.assertTrue; @@ -31,7 +23,6 @@ import java.util.List; import java.util.ArrayList; import java.util.Collections; -import java.lang.Character; import java.io.StringWriter; import java.io.PrintWriter; @@ -43,14 +34,12 @@ import org.yb.util.json.Checker; import org.yb.util.json.Checkers; import org.yb.util.json.JsonUtil; -import org.yb.util.json.ObjectChecker; import org.yb.pgsql.ExplainAnalyzeUtils.PlanCheckerBuilder; import org.yb.pgsql.ExplainAnalyzeUtils.TopLevelCheckerBuilder; import org.yb.minicluster.LogErrorListener; import org.yb.minicluster.MiniYBDaemon; import org.yb.util.BuildTypeUtil; -import org.yb.util.json.ValueChecker; import org.yb.YBTestRunner; import com.google.gson.JsonElement; @@ -166,7 +155,7 @@ public void testDistOn() throws Exception { TABLE_NAME, TABLE_NAME), makeTopLevelBuilder() .plan(makePlanBuilder() - .nodeType(NODE_YB_SEQ_SCAN) + .nodeType(NODE_SEQ_SCAN) .relationName(TABLE_NAME) .alias(TABLE_NAME) .storageTableReadRequests(Checkers.greaterOrEqual(0)) @@ -187,7 +176,7 @@ public void testDistOff() throws Exception { TABLE_NAME, TABLE_NAME), makeTopLevelBuilder() .plan(makePlanBuilder() - .nodeType(NODE_YB_SEQ_SCAN) + .nodeType(NODE_SEQ_SCAN) .relationName(TABLE_NAME) .alias(TABLE_NAME) .actualStartupTime(Checkers.greaterOrEqual(0.0)) @@ -211,7 +200,7 @@ public void testAnalyzeOff() throws Exception { TABLE_NAME, TABLE_NAME), makeTopLevelBuilder() .plan(makePlanBuilder() - .nodeType(NODE_YB_SEQ_SCAN) + .nodeType(NODE_SEQ_SCAN) // Startup cost and total cost because auto_explain .startupCost(Checkers.greaterOrEqual(0.0)) .totalCost(Checkers.greaterOrEqual(0.0)) diff --git a/java/yb-pgsql/src/test/java/org/yb/pgsql/TestPgCardinalityEstimation.java b/java/yb-pgsql/src/test/java/org/yb/pgsql/TestPgCardinalityEstimation.java index 797b28bfec8e..5ddc21f265f3 100644 --- a/java/yb-pgsql/src/test/java/org/yb/pgsql/TestPgCardinalityEstimation.java +++ b/java/yb-pgsql/src/test/java/org/yb/pgsql/TestPgCardinalityEstimation.java @@ -19,7 +19,6 @@ import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_MERGE_JOIN; import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_SEQ_SCAN; import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_SORT; -import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_YB_SEQ_SCAN; import org.yb.pgsql.ExplainAnalyzeUtils.PlanCheckerBuilder; import org.yb.pgsql.ExplainAnalyzeUtils.TopLevelCheckerBuilder; @@ -167,7 +166,7 @@ public void testMergeJoinWithIndex() throws Exception { .planRows(Checkers.greater(1)) .plans( makePlanBuilder() - .nodeType(NODE_YB_SEQ_SCAN) + .nodeType(NODE_SEQ_SCAN) .relationName(TABLE_NAME) .alias("t2") .planRows(Checkers.equal(TABLE_ROWS)) @@ -185,7 +184,7 @@ public void testMergeJoinWithIndex() throws Exception { .nodeType(NODE_SORT) .planRows(Checkers.greater(1)) .plans(makePlanBuilder() - .nodeType(NODE_YB_SEQ_SCAN) + .nodeType(NODE_SEQ_SCAN) .relationName(TABLE_NAME) .alias("t1") .planRows(Checkers.greater(1)) @@ -199,7 +198,7 @@ public void testMergeJoinWithIndex() throws Exception { .nodeType(NODE_SORT) .planRows(Checkers.equal(TABLE_ROWS)) .plans(makePlanBuilder() - .nodeType(NODE_YB_SEQ_SCAN) + .nodeType(NODE_SEQ_SCAN) .relationName(TABLE_NAME) .alias("t3") .planRows(Checkers.equal(TABLE_ROWS)) diff --git a/java/yb-pgsql/src/test/java/org/yb/pgsql/TestPgColumnReadEfficiency.java b/java/yb-pgsql/src/test/java/org/yb/pgsql/TestPgColumnReadEfficiency.java index 384f6f4cdc94..7ca895b25a09 100644 --- a/java/yb-pgsql/src/test/java/org/yb/pgsql/TestPgColumnReadEfficiency.java +++ b/java/yb-pgsql/src/test/java/org/yb/pgsql/TestPgColumnReadEfficiency.java @@ -13,28 +13,16 @@ package org.yb.pgsql; -import static org.yb.AssertionWrappers.assertEquals; -import static org.yb.AssertionWrappers.assertGreaterThan; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.google.common.collect.Streams; -import com.google.gson.JsonObject; -import com.google.gson.JsonParser; import org.junit.Test; import org.junit.runner.RunWith; import org.yb.util.YBTestRunnerNonTsanOnly; -import java.sql.SQLException; import java.sql.Statement; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; import java.util.List; import java.util.Map; -import java.util.stream.Collectors; -import java.util.stream.IntStream; -import java.util.stream.Stream; import java.util.Arrays; import com.google.common.collect.Range; @@ -45,7 +33,6 @@ import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_INDEX_SCAN; import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_INDEX_ONLY_SCAN; import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_SEQ_SCAN; -import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_YB_SEQ_SCAN; @RunWith(YBTestRunnerNonTsanOnly.class) public class TestPgColumnReadEfficiency extends BasePgSQLTest { @@ -127,7 +114,7 @@ public void testScanRowSize() throws Exception { ssEstimate = estimatedRpcsPerCol * 2; } - testSpecificScanRowSize(stmt, NODE_YB_SEQ_SCAN, select, where, ssEstimate, N_ROWS); + testSpecificScanRowSize(stmt, NODE_SEQ_SCAN, select, where, ssEstimate, N_ROWS); testSpecificScanRowSize(stmt, NODE_INDEX_ONLY_SCAN, select, where, iosEstimate, N_ROWS); if (nConditionCols > 0) @@ -166,9 +153,9 @@ public void testScanRowSizeHashCode() throws Exception { if (nSelectedCols == 0) { ssEstimateWithoutCond = estimatedRpcsPerCol * 6; } - testSpecificScanRowSize(stmt, NODE_YB_SEQ_SCAN, select, hashcodeCond, + testSpecificScanRowSize(stmt, NODE_SEQ_SCAN, select, hashcodeCond, ssEstimateWithCond, N_ROWS_MATCHING_COND); - testSpecificScanRowSize(stmt, NODE_YB_SEQ_SCAN, select, "", + testSpecificScanRowSize(stmt, NODE_SEQ_SCAN, select, "", ssEstimateWithoutCond, N_ROWS); } @@ -190,7 +177,7 @@ public void testScanRowSizeHashCode() throws Exception { } testSpecificScanRowSize(stmt, NODE_INDEX_ONLY_SCAN, select, hashcodeCond, iosEstimateWithCond, N_ROWS_MATCHING_COND); - testSpecificScanRowSize(stmt, NODE_YB_SEQ_SCAN, select, "", + testSpecificScanRowSize(stmt, NODE_SEQ_SCAN, select, "", iosEstimateWithoutCond, N_ROWS); } } @@ -200,7 +187,7 @@ private void testSpecificScanRowSize(Statement stmt, String scanType, String sel String conditions, long expected, int expectedRows) throws Exception { String hint; switch(scanType) { - case NODE_YB_SEQ_SCAN: + case NODE_SEQ_SCAN: hint = "SeqScan(t)"; break; case NODE_INDEX_ONLY_SCAN: diff --git a/java/yb-pgsql/src/test/java/org/yb/pgsql/TestPgExplainAnalyzeScans.java b/java/yb-pgsql/src/test/java/org/yb/pgsql/TestPgExplainAnalyzeScans.java index 150337d925e9..28c6f898d1c9 100644 --- a/java/yb-pgsql/src/test/java/org/yb/pgsql/TestPgExplainAnalyzeScans.java +++ b/java/yb-pgsql/src/test/java/org/yb/pgsql/TestPgExplainAnalyzeScans.java @@ -3,7 +3,6 @@ import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_INDEX_SCAN; import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_INDEX_ONLY_SCAN; import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_SEQ_SCAN; -import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_YB_SEQ_SCAN; import java.sql.Statement; @@ -140,8 +139,8 @@ public void testYbSeqScan() throws Exception { final String queryWithExpr = String.format("/*+ SeqScan(foo) */ SELECT * FROM %s " + "WHERE v5 < 64", MAIN_TABLE); - PlanCheckerBuilder YB_SEQ_SCAN_PLAN = makePlanBuilder() - .nodeType(NODE_YB_SEQ_SCAN) + PlanCheckerBuilder SEQ_SCAN_PLAN = makePlanBuilder() + .nodeType(NODE_SEQ_SCAN) .relationName(MAIN_TABLE) .alias(MAIN_TABLE) .storageTableReadExecutionTime(Checkers.greater(0.0)); @@ -150,7 +149,7 @@ public void testYbSeqScan() throws Exception { Checker checker = SCAN_TOP_LEVEL_CHECKER .storageReadRequests(Checkers.equal(NUM_PAGES + 1)) .storageReadExecutionTime(Checkers.greater(0.0)) - .plan(YB_SEQ_SCAN_PLAN + .plan(SEQ_SCAN_PLAN .storageTableReadRequests(Checkers.equal(NUM_PAGES + 1)) .build()) .build(); @@ -161,7 +160,7 @@ public void testYbSeqScan() throws Exception { Checker pushdown_checker = SCAN_TOP_LEVEL_CHECKER .storageReadRequests(Checkers.equal(3)) .storageReadExecutionTime(Checkers.greater(0.0)) - .plan(YB_SEQ_SCAN_PLAN + .plan(SEQ_SCAN_PLAN .storageTableReadRequests(Checkers.equal(3)) .build()) .build(); @@ -172,7 +171,7 @@ public void testYbSeqScan() throws Exception { Checker no_pushdown_checker = SCAN_TOP_LEVEL_CHECKER .storageReadRequests(Checkers.equal(NUM_PAGES + 1)) .storageReadExecutionTime(Checkers.greater(0.0)) - .plan(YB_SEQ_SCAN_PLAN + .plan(SEQ_SCAN_PLAN .storageTableReadRequests(Checkers.equal(NUM_PAGES + 1)) .build()) .build(); diff --git a/java/yb-pgsql/src/test/java/org/yb/pgsql/TestPgPrefetchControl.java b/java/yb-pgsql/src/test/java/org/yb/pgsql/TestPgPrefetchControl.java index fe245d324592..0bef918f521a 100644 --- a/java/yb-pgsql/src/test/java/org/yb/pgsql/TestPgPrefetchControl.java +++ b/java/yb-pgsql/src/test/java/org/yb/pgsql/TestPgPrefetchControl.java @@ -23,8 +23,6 @@ import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; import java.util.List; import static org.yb.AssertionWrappers.assertEquals; @@ -34,7 +32,6 @@ import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_LIMIT; import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_SEQ_SCAN; import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_YB_BATCHED_NESTED_LOOP; -import static org.yb.pgsql.ExplainAnalyzeUtils.NODE_YB_SEQ_SCAN; import org.yb.util.json.Checker; import org.yb.util.json.Checkers; @@ -87,13 +84,9 @@ public void testSimplePrefetch() throws Exception { tableName, tableRowCount - 1)); String seqScanQuery = String.format("SELECT * FROM %s", tableName); - String ybSeqScanQuery = String.format("/*+ SeqScan(%s) */ SELECT * FROM %s", - tableName, tableName); checkReadRequests(statement, seqScanQuery, NODE_SEQ_SCAN, Checkers.equal(51), tableRowCount); - checkReadRequests(statement, ybSeqScanQuery, NODE_YB_SEQ_SCAN, - Checkers.equal(51), tableRowCount); } } @@ -121,16 +114,12 @@ public void testSizeBasedFetch() throws Exception { statement.execute(String.format("create index on %s (v asc)", tableName)); String seqScanQuery = String.format("SELECT * FROM %s", tableName); - String ybSeqScanQuery = String.format("/*+ SeqScan(%s) */ SELECT * FROM %s", - tableName, tableName); String indexScanQuery = String.format("SELECT * FROM %s WHERE k > 0", tableName); String indexOnlyScanQuery = String.format("SELECT v FROM %s WHERE v > ''", tableName); setRowAndSizeLimit(statement, 1024, 0); checkReadRequests(statement, seqScanQuery, NODE_SEQ_SCAN, Checkers.equal(98), tableRowCount); - checkReadRequests(statement, ybSeqScanQuery, NODE_YB_SEQ_SCAN, - Checkers.equal(98), tableRowCount); checkReadRequests(statement, indexScanQuery, NODE_INDEX_SCAN, Checkers.equal(98), tableRowCount); checkReadRequests(statement, indexOnlyScanQuery, NODE_INDEX_ONLY_SCAN, @@ -139,8 +128,6 @@ public void testSizeBasedFetch() throws Exception { setRowAndSizeLimit(statement, 0, 0); checkReadRequests(statement, seqScanQuery, NODE_SEQ_SCAN, Checkers.equal(1), tableRowCount); - checkReadRequests(statement, ybSeqScanQuery, NODE_YB_SEQ_SCAN, - Checkers.equal(1), tableRowCount); checkReadRequests(statement, indexScanQuery, NODE_INDEX_SCAN, Checkers.equal(1), tableRowCount); checkReadRequests(statement, indexOnlyScanQuery, NODE_INDEX_ONLY_SCAN, @@ -150,8 +137,6 @@ public void testSizeBasedFetch() throws Exception { setRowAndSizeLimit(statement, 0, 512); checkReadRequests(statement, seqScanQuery, NODE_SEQ_SCAN, Checkers.equal(25), tableRowCount); - checkReadRequests(statement, ybSeqScanQuery, NODE_YB_SEQ_SCAN, - Checkers.equal(25), tableRowCount); checkReadRequests(statement, indexScanQuery, NODE_INDEX_SCAN, Checkers.equal(25), tableRowCount); checkReadRequests(statement, indexOnlyScanQuery, NODE_INDEX_ONLY_SCAN, @@ -160,8 +145,6 @@ public void testSizeBasedFetch() throws Exception { setRowAndSizeLimit(statement, 0, 1024); checkReadRequests(statement, seqScanQuery, NODE_SEQ_SCAN, Checkers.equal(13), tableRowCount); - checkReadRequests(statement, ybSeqScanQuery, NODE_YB_SEQ_SCAN, - Checkers.equal(13), tableRowCount); checkReadRequests(statement, indexScanQuery, NODE_INDEX_SCAN, Checkers.equal(13), tableRowCount); checkReadRequests(statement, indexOnlyScanQuery, NODE_INDEX_ONLY_SCAN, diff --git a/java/yb-pgsql/src/test/java/org/yb/pgsql/TestYbBackup.java b/java/yb-pgsql/src/test/java/org/yb/pgsql/TestYbBackup.java index c9cce0c1a199..0866732848f7 100644 --- a/java/yb-pgsql/src/test/java/org/yb/pgsql/TestYbBackup.java +++ b/java/yb-pgsql/src/test/java/org/yb/pgsql/TestYbBackup.java @@ -1715,7 +1715,7 @@ public void testPgHintPlan() throws Exception { " VALUES ('EXPLAIN (COSTS false) SELECT * FROM tbl1 WHERE tbl1.k = ?'," + " '', 'SeqScan(tbl1)')"); assertQuery(stmt, "EXPLAIN (COSTS false) SELECT * FROM tbl1 WHERE tbl1.k = 1", - new Row("YB Seq Scan on tbl1"), + new Row("Seq Scan on tbl1"), new Row(" Remote Filter: (k = 1)")); stmt.execute("SET pg_hint_plan.enable_hint_table = off"); assertQuery(stmt, "EXPLAIN (COSTS false) SELECT * FROM tbl1 WHERE tbl1.k = 1", @@ -1738,10 +1738,10 @@ public void testPgHintPlan() throws Exception { " '', 'SeqScan(tbl2)')"); stmt.execute("SET pg_hint_plan.enable_hint_table = on"); assertQuery(stmt, "EXPLAIN (COSTS false) SELECT * FROM tbl1 WHERE tbl1.k = 1", - new Row("YB Seq Scan on tbl1"), + new Row("Seq Scan on tbl1"), new Row(" Remote Filter: (k = 1)")); assertQuery(stmt, "EXPLAIN (COSTS false) SELECT * FROM tbl2 WHERE tbl2.k = 3", - new Row("YB Seq Scan on tbl2"), + new Row("Seq Scan on tbl2"), new Row(" Remote Filter: (k = 3)")); stmt.execute("SET pg_hint_plan.enable_hint_table = off"); assertQuery(stmt, "EXPLAIN (COSTS false) SELECT * FROM tbl1 WHERE tbl1.k = 1", diff --git a/src/postgres/src/backend/commands/explain.c b/src/postgres/src/backend/commands/explain.c index b1a06413ca1f..0b051247683d 100644 --- a/src/postgres/src/backend/commands/explain.c +++ b/src/postgres/src/backend/commands/explain.c @@ -1307,7 +1307,7 @@ ExplainNode(PlanState *planstate, List *ancestors, pname = sname = "Seq Scan"; break; case T_YbSeqScan: - pname = sname = "YB Seq Scan"; + pname = sname = "Seq Scan"; break; case T_SampleScan: pname = sname = "Sample Scan"; @@ -1365,7 +1365,7 @@ ExplainNode(PlanState *planstate, List *ancestors, case CMD_SELECT: /* Don't need to expose implementation details */ if (IsYBRelation(((ScanState*) planstate)->ss_currentRelation)) - sname = pname = "Seq Scan"; + sname = pname = "YB Foreign Scan"; else pname = "Foreign Scan"; operation = "Select"; diff --git a/src/postgres/src/backend/optimizer/path/allpaths.c b/src/postgres/src/backend/optimizer/path/allpaths.c index ea1065221e90..18f30a5643b3 100644 --- a/src/postgres/src/backend/optimizer/path/allpaths.c +++ b/src/postgres/src/backend/optimizer/path/allpaths.c @@ -525,19 +525,7 @@ set_rel_pathlist(PlannerInfo *root, RelOptInfo *rel, else { /* Plain relation */ - if (IsYBRelationById(rte->relid)) - { - /* - * Using a foreign scan which will use the YB FDW by - * default. - */ - set_foreign_pathlist(root, rel, rte); - } - else - { - /* Use regular scan for initdb tables. */ - set_plain_rel_pathlist(root, rel, rte); - } + set_plain_rel_pathlist(root, rel, rte); } break; case RTE_SUBQUERY: diff --git a/src/postgres/src/test/regress/expected/yb_aggregates.out b/src/postgres/src/test/regress/expected/yb_aggregates.out index 5386b12e024d..3adb99a4b6e9 100644 --- a/src/postgres/src/test/regress/expected/yb_aggregates.out +++ b/src/postgres/src/test/regress/expected/yb_aggregates.out @@ -42,7 +42,7 @@ INSERT INTO ybaggtest QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on ybaggtest + -> Seq Scan on ybaggtest Partial Aggregate: true (3 rows) @@ -93,7 +93,7 @@ INSERT INTO ybaggtest QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on ybaggtest + -> Seq Scan on ybaggtest Partial Aggregate: true (3 rows) @@ -144,7 +144,7 @@ INSERT INTO ybaggtest QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on ybaggtest + -> Seq Scan on ybaggtest Partial Aggregate: true (3 rows) @@ -224,7 +224,7 @@ SELECT COUNT(0) FROM ybaggtest; QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on ybaggtest + -> Seq Scan on ybaggtest Partial Aggregate: true (3 rows) @@ -272,10 +272,10 @@ SELECT COUNT(0) FROM ybaggtest; -> Seq Scan on ybaggtest (2 rows) - QUERY PLAN --------------------------------- + QUERY PLAN +----------------------------- Aggregate - -> YB Seq Scan on ybaggtest + -> Seq Scan on ybaggtest (2 rows) QUERY PLAN @@ -325,7 +325,7 @@ SELECT COUNT(0) FROM ybaggtest; QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on ybaggtest + -> Seq Scan on ybaggtest Partial Aggregate: true (3 rows) @@ -377,7 +377,7 @@ SELECT COUNT(0) FROM ybaggtest; QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on ybaggtest + -> Seq Scan on ybaggtest Partial Aggregate: true (3 rows) @@ -430,7 +430,7 @@ INSERT INTO ybaggtest (id, int_4, float_4, float_8) VALUES (101, 1, 'NaN', 'NaN' QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on ybaggtest + -> Seq Scan on ybaggtest Partial Aggregate: true (3 rows) @@ -481,7 +481,7 @@ INSERT INTO ybaggtest (id, int_4, float_4, float_8) VALUES (101, 1, 'NaN', 'NaN' QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on ybaggtest + -> Seq Scan on ybaggtest Partial Aggregate: true (3 rows) @@ -535,7 +535,7 @@ INSERT INTO ybaggtest (id, int_4, float_4, float_8) VALUES (101, 1, 'NaN', 'NaN' QUERY PLAN ---------------------------------------------------------- Finalize Aggregate - -> YB Seq Scan on ybaggtest + -> Seq Scan on ybaggtest Remote Filter: (float_4 > '0'::double precision) Partial Aggregate: true (4 rows) @@ -576,7 +576,7 @@ INSERT INTO ybaggtest (id, int_4, float_4, float_8) VALUES (101, 1, 'NaN', 'NaN' QUERY PLAN ---------------------------------------------------------------------------- Finalize Aggregate - -> YB Seq Scan on ybaggtest + -> Seq Scan on ybaggtest Remote Filter: ((int_4 > 0) AND (float_8 > '0'::double precision)) Partial Aggregate: true (4 rows) @@ -617,7 +617,7 @@ INSERT INTO ybaggtest (id, int_4, float_4, float_8) VALUES (101, 1, 'NaN', 'NaN' QUERY PLAN ---------------------------------------------------------------- Finalize Aggregate - -> YB Seq Scan on ybaggtest + -> Seq Scan on ybaggtest Remote Filter: (int_8 = '9223372036854775807'::bigint) Partial Aggregate: true (4 rows) @@ -657,7 +657,7 @@ INSERT INTO ybaggtest (id, int_4, float_4, float_8) VALUES (101, 1, 'NaN', 'NaN' QUERY PLAN -------------------------------------------------------------------------------------- Finalize Aggregate - -> YB Seq Scan on ybaggtest + -> Seq Scan on ybaggtest Remote Filter: ((int_8 = '9223372036854775807'::bigint) AND (int_2 = 32767)) Partial Aggregate: true (4 rows) @@ -738,7 +738,7 @@ INSERT INTO ybaggtest2 VALUES (1), (2), (3); QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on ybaggtest2 + -> Seq Scan on ybaggtest2 Partial Aggregate: true (3 rows) @@ -780,7 +780,7 @@ INSERT INTO ybaggtest2 VALUES (1), (2), (3); QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on ybaggtest2 + -> Seq Scan on ybaggtest2 Partial Aggregate: true (3 rows) @@ -817,7 +817,7 @@ INSERT INTO ybaggtest2 VALUES (1), (2), (3); QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on ybaggtest2 + -> Seq Scan on ybaggtest2 Partial Aggregate: true (3 rows) @@ -855,7 +855,7 @@ INSERT INTO ybaggtest2 VALUES (1), (2), (3); QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on ybaggtest2 + -> Seq Scan on ybaggtest2 Partial Aggregate: true (3 rows) @@ -893,7 +893,7 @@ INSERT INTO ybaggtest2 VALUES (1), (2), (3); QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on ybaggtest2 + -> Seq Scan on ybaggtest2 Partial Aggregate: true (3 rows) @@ -931,7 +931,7 @@ INSERT INTO ybaggtest2 VALUES (1), (2), (3); QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on ybaggtest2 + -> Seq Scan on ybaggtest2 Partial Aggregate: true (3 rows) @@ -971,7 +971,7 @@ INSERT INTO ybaggtest2 VALUES (1), (2), (3); QUERY PLAN ------------------------------------ Finalize Aggregate - -> YB Seq Scan on ybaggtest2 + -> Seq Scan on ybaggtest2 Remote Filter: (a IS NULL) Partial Aggregate: true (4 rows) @@ -1012,7 +1012,7 @@ INSERT INTO ybaggtest2 VALUES (1), (2), (3); QUERY PLAN ---------------------------------------- Finalize Aggregate - -> YB Seq Scan on ybaggtest2 + -> Seq Scan on ybaggtest2 Remote Filter: (a IS NOT NULL) Partial Aggregate: true (4 rows) @@ -1066,7 +1066,7 @@ INSERT INTO test VALUES(1), (2), (3); QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on test + -> Seq Scan on test Partial Aggregate: true (3 rows) @@ -1117,7 +1117,7 @@ INSERT INTO test VALUES(1), (2), (3); QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on test + -> Seq Scan on test Partial Aggregate: true (3 rows) @@ -1168,7 +1168,7 @@ INSERT INTO test VALUES(1), (2), (3); QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on test + -> Seq Scan on test Partial Aggregate: true (3 rows) @@ -1219,7 +1219,7 @@ INSERT INTO test VALUES(1), (2), (3); QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on test + -> Seq Scan on test Partial Aggregate: true (3 rows) @@ -1278,7 +1278,7 @@ INSERT INTO test VALUES(1), (2), (3); ---------------------------------------------- Nested Loop -> Finalize Aggregate - -> YB Seq Scan on test + -> Seq Scan on test Partial Aggregate: true -> Index Scan using digit_pkey on digit d Index Cond: (k = (count(test.v2))) @@ -1339,7 +1339,7 @@ INSERT INTO test VALUES(4, NULL, 10), (5, 5, NULL), (6, 5, NULL); QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on test + -> Seq Scan on test Partial Aggregate: true (3 rows) @@ -1390,7 +1390,7 @@ INSERT INTO test VALUES(4, NULL, 10), (5, 5, NULL), (6, 5, NULL); QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on test + -> Seq Scan on test Partial Aggregate: true (3 rows) @@ -1441,7 +1441,7 @@ INSERT INTO test VALUES(4, NULL, 10), (5, 5, NULL), (6, 5, NULL); QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on test + -> Seq Scan on test Partial Aggregate: true (3 rows) @@ -1492,7 +1492,7 @@ INSERT INTO test VALUES(4, NULL, 10), (5, 5, NULL), (6, 5, NULL); QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on test + -> Seq Scan on test Partial Aggregate: true (3 rows) @@ -1549,7 +1549,7 @@ INSERT INTO test VALUES(4, NULL, 10), (5, 5, NULL), (6, 5, NULL); ---------------------------------------------- Nested Loop -> Finalize Aggregate - -> YB Seq Scan on test + -> Seq Scan on test Partial Aggregate: true -> Index Scan using digit_pkey on digit d Index Cond: (k = (count(*))) @@ -1612,7 +1612,7 @@ INSERT INTO test VALUES(4, NULL, 10), (5, 5, NULL), (6, 5, NULL); ---------------------------------------------- Nested Loop -> Finalize Aggregate - -> YB Seq Scan on test + -> Seq Scan on test Partial Aggregate: true -> Index Scan using digit_pkey on digit d Index Cond: (k = (count(test.k))) @@ -1675,7 +1675,7 @@ INSERT INTO test VALUES(4, NULL, 10), (5, 5, NULL), (6, 5, NULL); ---------------------------------------------- Nested Loop -> Finalize Aggregate - -> YB Seq Scan on test + -> Seq Scan on test Partial Aggregate: true -> Index Scan using digit_pkey on digit d Index Cond: (k = (count(test.v1))) @@ -1738,7 +1738,7 @@ INSERT INTO test VALUES(4, NULL, 10), (5, 5, NULL), (6, 5, NULL); ---------------------------------------------- Nested Loop -> Finalize Aggregate - -> YB Seq Scan on test + -> Seq Scan on test Partial Aggregate: true -> Index Scan using digit_pkey on digit d Index Cond: (k = (count(test.v2))) @@ -1807,7 +1807,7 @@ AlTER TABLE test DROP v1; QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on test + -> Seq Scan on test Partial Aggregate: true (3 rows) @@ -1858,7 +1858,7 @@ AlTER TABLE test DROP v1; QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on test + -> Seq Scan on test Partial Aggregate: true (3 rows) @@ -1909,7 +1909,7 @@ AlTER TABLE test DROP v1; QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on test + -> Seq Scan on test Partial Aggregate: true (3 rows) @@ -1960,7 +1960,7 @@ AlTER TABLE test DROP v1; QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on test + -> Seq Scan on test Partial Aggregate: true (3 rows) @@ -2024,10 +2024,10 @@ INSERT INTO t1(c0) VALUES(0.9946693818538820952568357824929989874362945556640625 -> Seq Scan on t1 (2 rows) - QUERY PLAN -------------------------- + QUERY PLAN +---------------------- Aggregate - -> YB Seq Scan on t1 + -> Seq Scan on t1 (2 rows) QUERY PLAN @@ -2079,10 +2079,10 @@ INSERT INTO t2 VALUES(1), (2), (3); -> Seq Scan on t2 (2 rows) - QUERY PLAN -------------------------- + QUERY PLAN +---------------------- Aggregate - -> YB Seq Scan on t2 + -> Seq Scan on t2 (2 rows) QUERY PLAN @@ -2134,10 +2134,10 @@ INSERT INTO t3 VALUES(1), (2), (3); -> Seq Scan on t3 (2 rows) - QUERY PLAN -------------------------- + QUERY PLAN +---------------------- Aggregate - -> YB Seq Scan on t3 + -> Seq Scan on t3 (2 rows) QUERY PLAN @@ -2189,10 +2189,10 @@ INSERT INTO t4 VALUES(1), (2), (3); -> Seq Scan on t4 (2 rows) - QUERY PLAN -------------------------- + QUERY PLAN +---------------------- Aggregate - -> YB Seq Scan on t4 + -> Seq Scan on t4 (2 rows) QUERY PLAN @@ -2251,7 +2251,7 @@ INSERT INTO rsplit VALUES (1), (2), (3); QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on rsplit + -> Seq Scan on rsplit Remote Filter: (i = 2) Partial Aggregate: true (4 rows) @@ -2305,7 +2305,7 @@ INSERT INTO rsplit VALUES (1), (2), (3); QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on rsplit + -> Seq Scan on rsplit Remote Filter: (i = 3) Partial Aggregate: true (4 rows) @@ -2365,7 +2365,7 @@ INSERT INTO rsplit VALUES (1), (2), (3); QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on pg_type + -> Seq Scan on pg_type Partial Aggregate: true (3 rows) @@ -2689,7 +2689,7 @@ INSERT INTO t VALUES (1, 2, 3), (4, 2, 6); QUERY PLAN --------------------------------- Finalize Aggregate - -> YB Seq Scan on t + -> Seq Scan on t Partial Aggregate: true (3 rows) diff --git a/src/postgres/src/test/regress/expected/yb_distinct_pushdown_join.out b/src/postgres/src/test/regress/expected/yb_distinct_pushdown_join.out index d2d8789aa556..d50be04f0421 100644 --- a/src/postgres/src/test/regress/expected/yb_distinct_pushdown_join.out +++ b/src/postgres/src/test/regress/expected/yb_distinct_pushdown_join.out @@ -491,7 +491,7 @@ SELECT DISTINCT t1.r2 FROM t t1 JOIN t t2 USING (r2) WHERE t2.r2 = 2; ------------------------------------------------------------------------------------------ Unique (actual rows=1 loops=1) -> Nested Loop (actual rows=1000 loops=1) - -> YB Seq Scan on t t1 (actual rows=1000 loops=1) + -> Seq Scan on t t1 (actual rows=1000 loops=1) Remote Filter: (r1 = 1) -> Materialize (actual rows=1 loops=1000) -> Unique (actual rows=1 loops=1) diff --git a/src/postgres/src/test/regress/expected/yb_dml_pushdown.out b/src/postgres/src/test/regress/expected/yb_dml_pushdown.out index bfde4c269a89..e6a72b0d19b3 100644 --- a/src/postgres/src/test/regress/expected/yb_dml_pushdown.out +++ b/src/postgres/src/test/regress/expected/yb_dml_pushdown.out @@ -925,8 +925,8 @@ EXPLAIN (COSTS OFF) UPDATE single_row_function_test SET created_at = '2022-01-01 -------------------------------------------------- Update on single_row_function_test -> Seq Scan on single_row_function_test - Filter: (date_pk = now()) Remote Filter: (k = (random())::integer) + Filter: (date_pk = now()) (4 rows) DROP TABLE single_row_function_test; diff --git a/src/postgres/src/test/regress/expected/yb_dml_single_row.out b/src/postgres/src/test/regress/expected/yb_dml_single_row.out index 0ccb2b134a0e..916cd49c065f 100644 --- a/src/postgres/src/test/regress/expected/yb_dml_single_row.out +++ b/src/postgres/src/test/regress/expected/yb_dml_single_row.out @@ -2710,10 +2710,10 @@ SELECT * FROM multi_row; -- Test if delete on top of YBSeqScan works properly (GHI #14103) EXPLAIN (COSTS FALSE) /*+ SeqScan(multi_row) */ DELETE FROM multi_row WHERE k < 2; - QUERY PLAN --------------------------------- + QUERY PLAN +----------------------------- Delete on multi_row - -> YB Seq Scan on multi_row + -> Seq Scan on multi_row Filter: (k < 2) (3 rows) diff --git a/src/postgres/src/test/regress/expected/yb_explicit_row_lock_planning.out b/src/postgres/src/test/regress/expected/yb_explicit_row_lock_planning.out index 6c7558b3815e..2420f2887588 100644 --- a/src/postgres/src/test/regress/expected/yb_explicit_row_lock_planning.out +++ b/src/postgres/src/test/regress/expected/yb_explicit_row_lock_planning.out @@ -11,14 +11,14 @@ SET yb_lock_pk_single_rpc TO ON; -- Test plain (unlocked case). EXPLAIN (COSTS OFF) SELECT * FROM yb_locks_t WHERE k=5; - QUERY PLAN + QUERY PLAN ------------------------------------------------ Index Scan using yb_locks_t_pkey on yb_locks_t Index Cond: (k = 5) (2 rows) SELECT * FROM yb_locks_t WHERE k=5; - k + k --- 5 (1 row) @@ -26,14 +26,14 @@ SELECT * FROM yb_locks_t WHERE k=5; -- Test single-RPC select+lock (no LockRows node). EXPLAIN (COSTS OFF) SELECT * FROM yb_locks_t WHERE k=5 FOR UPDATE; - QUERY PLAN + QUERY PLAN -------------------------------------------------------------------- Index Scan (Locked FOR UPDATE) using yb_locks_t_pkey on yb_locks_t Index Cond: (k = 5) (2 rows) SELECT * FROM yb_locks_t WHERE k=5 FOR UPDATE; - k + k --- 5 (1 row) @@ -41,42 +41,42 @@ SELECT * FROM yb_locks_t WHERE k=5 FOR UPDATE; -- Test other types of locking. EXPLAIN (COSTS OFF) SELECT * FROM yb_locks_t WHERE k=5 FOR SHARE; - QUERY PLAN + QUERY PLAN ------------------------------------------------------------------- Index Scan (Locked FOR SHARE) using yb_locks_t_pkey on yb_locks_t Index Cond: (k = 5) (2 rows) SELECT * FROM yb_locks_t WHERE k=5 FOR SHARE; - k + k --- 5 (1 row) EXPLAIN (COSTS OFF) SELECT * FROM yb_locks_t WHERE k=5 FOR NO KEY UPDATE; - QUERY PLAN + QUERY PLAN --------------------------------------------------------------------------- Index Scan (Locked FOR NO KEY UPDATE) using yb_locks_t_pkey on yb_locks_t Index Cond: (k = 5) (2 rows) SELECT * FROM yb_locks_t WHERE k=5 FOR NO KEY UPDATE; - k + k --- 5 (1 row) EXPLAIN (COSTS OFF) SELECT * FROM yb_locks_t WHERE k=5 FOR KEY SHARE; - QUERY PLAN + QUERY PLAN ----------------------------------------------------------------------- Index Scan (Locked FOR KEY SHARE) using yb_locks_t_pkey on yb_locks_t Index Cond: (k = 5) (2 rows) SELECT * FROM yb_locks_t WHERE k=5 FOR KEY SHARE; - k + k --- 5 (1 row) @@ -84,14 +84,14 @@ SELECT * FROM yb_locks_t WHERE k=5 FOR KEY SHARE; -- Test LockRows node (more RPCs), and scan is unlocked. EXPLAIN (COSTS OFF) SELECT * FROM yb_locks_t FOR UPDATE; - QUERY PLAN + QUERY PLAN ------------------------------ LockRows -> Seq Scan on yb_locks_t (2 rows) SELECT * FROM yb_locks_t FOR UPDATE; - k + k --- 5 1 @@ -103,14 +103,14 @@ SELECT * FROM yb_locks_t FOR UPDATE; -- Test with multi-column primary key. EXPLAIN (COSTS OFF) SELECT * FROM yb_locks_t2 WHERE k1=1 AND k2=2 AND k3=3 FOR UPDATE; - QUERY PLAN + QUERY PLAN ---------------------------------------------------------------------- Index Scan (Locked FOR UPDATE) using yb_locks_t2_pkey on yb_locks_t2 Index Cond: ((k1 = 1) AND (k2 = 2) AND (k3 = 3)) (2 rows) SELECT * FROM yb_locks_t2 WHERE k1=1 AND k2=2 AND k3=3 FOR UPDATE; - k1 | k2 | k3 | v + k1 | k2 | k3 | v ----+----+----+--- 1 | 2 | 3 | 4 (1 row) @@ -118,7 +118,7 @@ SELECT * FROM yb_locks_t2 WHERE k1=1 AND k2=2 AND k3=3 FOR UPDATE; -- Test with partial column set for primary key (should use LockRows). EXPLAIN (COSTS OFF) SELECT * FROM yb_locks_t2 WHERE k1=1 AND k2=2 FOR UPDATE; - QUERY PLAN + QUERY PLAN -------------------------------------------------------- LockRows -> Index Scan using yb_locks_t2_pkey on yb_locks_t2 @@ -126,7 +126,7 @@ SELECT * FROM yb_locks_t2 WHERE k1=1 AND k2=2 FOR UPDATE; (3 rows) SELECT * FROM yb_locks_t2 WHERE k1=1 AND k2=2 FOR UPDATE; - k1 | k2 | k3 | v + k1 | k2 | k3 | v ----+----+----+--- 1 | 2 | 3 | 4 (1 row) @@ -134,7 +134,7 @@ SELECT * FROM yb_locks_t2 WHERE k1=1 AND k2=2 FOR UPDATE; -- Test LockRows node is used for join. EXPLAIN (COSTS OFF) SELECT * FROM yb_locks_t2, yb_locks_t WHERE yb_locks_t2.k1 = yb_locks_t.k FOR UPDATE; - QUERY PLAN + QUERY PLAN ------------------------------------------------------------ LockRows -> Nested Loop @@ -144,7 +144,7 @@ SELECT * FROM yb_locks_t2, yb_locks_t WHERE yb_locks_t2.k1 = yb_locks_t.k FOR UP (5 rows) SELECT * FROM yb_locks_t2, yb_locks_t WHERE yb_locks_t2.k1 = yb_locks_t.k FOR UPDATE; - k1 | k2 | k3 | v | k + k1 | k2 | k3 | v | k ----+----+----+---+--- 5 | 6 | 7 | 8 | 5 1 | 2 | 3 | 4 | 1 @@ -153,15 +153,15 @@ SELECT * FROM yb_locks_t2, yb_locks_t WHERE yb_locks_t2.k1 = yb_locks_t.k FOR UP -- Test LockRows node is used with ASC table when YB Sequential Scan is used. /*+ SeqScan(yb_locks_tasc) */ EXPLAIN (COSTS OFF) SELECT * FROM yb_locks_tasc WHERE k=1 FOR UPDATE; - QUERY PLAN ------------------------------------- + QUERY PLAN +--------------------------------- LockRows - -> YB Seq Scan on yb_locks_tasc + -> Seq Scan on yb_locks_tasc Remote Filter: (k = 1) (3 rows) /*+ SeqScan(yb_locks_tasc) */ SELECT * FROM yb_locks_tasc WHERE k=1 FOR UPDATE; - k + k --- 1 (1 row) @@ -171,14 +171,14 @@ BEGIN ISOLATION LEVEL SERIALIZABLE; -- Test same locking as for REPEATABLE READ (default isolation). EXPLAIN (COSTS OFF) SELECT * FROM yb_locks_t WHERE k=5 FOR UPDATE; - QUERY PLAN + QUERY PLAN -------------------------------------------------------------------- Index Scan (Locked FOR UPDATE) using yb_locks_t_pkey on yb_locks_t Index Cond: (k = 5) (2 rows) SELECT * FROM yb_locks_t WHERE k=5 FOR UPDATE; - k + k --- 5 (1 row) @@ -186,14 +186,14 @@ SELECT * FROM yb_locks_t WHERE k=5 FOR UPDATE; -- Test no LockRows node for sequential scan. EXPLAIN (COSTS OFF) SELECT * FROM yb_locks_t FOR UPDATE; - QUERY PLAN + QUERY PLAN -------------------------------------------------- LockRows (no-op) -> Seq Scan (Locked FOR UPDATE) on yb_locks_t (2 rows) SELECT * FROM yb_locks_t FOR UPDATE; - k + k --- 5 1 @@ -205,7 +205,7 @@ SELECT * FROM yb_locks_t FOR UPDATE; -- Test no LockRows node for join. EXPLAIN (COSTS OFF) SELECT * FROM yb_locks_t2, yb_locks_t WHERE yb_locks_t2.k1 = yb_locks_t.k FOR UPDATE; - QUERY PLAN + QUERY PLAN -------------------------------------------------------------------------------- LockRows (no-op) -> Nested Loop @@ -215,7 +215,7 @@ SELECT * FROM yb_locks_t2, yb_locks_t WHERE yb_locks_t2.k1 = yb_locks_t.k FOR UP (5 rows) SELECT * FROM yb_locks_t2, yb_locks_t WHERE yb_locks_t2.k1 = yb_locks_t.k FOR UPDATE; - k1 | k2 | k3 | v | k + k1 | k2 | k3 | v | k ----+----+----+---+--- 5 | 6 | 7 | 8 | 5 1 | 2 | 3 | 4 | 1 @@ -225,14 +225,14 @@ SELECT * FROM yb_locks_t2, yb_locks_t WHERE yb_locks_t2.k1 = yb_locks_t.k FOR UP -- (No WHERE clause.) /*+ SeqScan(yb_locks_tasc) */ EXPLAIN (COSTS OFF) SELECT * FROM yb_locks_tasc FOR UPDATE; - QUERY PLAN --------------------------------------------------------- + QUERY PLAN +----------------------------------------------------- LockRows (no-op) - -> YB Seq Scan (Locked FOR UPDATE) on yb_locks_tasc + -> Seq Scan (Locked FOR UPDATE) on yb_locks_tasc (2 rows) /*+ SeqScan(yb_locks_tasc) */ SELECT * FROM yb_locks_tasc FOR UPDATE; - k + k --- 1 2 @@ -242,14 +242,14 @@ SELECT * FROM yb_locks_tasc FOR UPDATE; -- For an ASC table, should lock inline, with no LockRows node. EXPLAIN (COSTS OFF) SELECT * FROM yb_locks_tasc ORDER BY k FOR UPDATE; - QUERY PLAN + QUERY PLAN -------------------------------------------------------------------------------- LockRows (no-op) -> Index Scan (Locked FOR UPDATE) using yb_locks_tasc_pkey on yb_locks_tasc (2 rows) SELECT * FROM yb_locks_tasc ORDER BY k FOR UPDATE; - k + k --- 1 2 @@ -261,7 +261,7 @@ COMMIT; SET yb_lock_pk_single_rpc TO OFF; EXPLAIN (COSTS OFF) SELECT * FROM yb_locks_t WHERE k=5 FOR UPDATE; - QUERY PLAN + QUERY PLAN ------------------------------------------------------ LockRows -> Index Scan using yb_locks_t_pkey on yb_locks_t @@ -269,7 +269,7 @@ SELECT * FROM yb_locks_t WHERE k=5 FOR UPDATE; (3 rows) SELECT * FROM yb_locks_t WHERE k=5 FOR UPDATE; - k + k --- 5 (1 row) @@ -279,7 +279,7 @@ SELECT * FROM yb_locks_t WHERE k=5 FOR UPDATE; BEGIN ISOLATION LEVEL SERIALIZABLE; EXPLAIN (COSTS OFF) SELECT * FROM yb_locks_t WHERE k=5 FOR UPDATE; - QUERY PLAN + QUERY PLAN -------------------------------------------------------------------------- LockRows (no-op) -> Index Scan (Locked FOR UPDATE) using yb_locks_t_pkey on yb_locks_t @@ -287,7 +287,7 @@ SELECT * FROM yb_locks_t WHERE k=5 FOR UPDATE; (3 rows) SELECT * FROM yb_locks_t WHERE k=5 FOR UPDATE; - k + k --- 5 (1 row) @@ -298,7 +298,7 @@ CREATE INDEX ON yb_locks_t2 (v); -- Test with an index. We use a LockRows node for an index. EXPLAIN (COSTS OFF) SELECT * FROM yb_locks_t2 WHERE v=4 FOR UPDATE; - QUERY PLAN + QUERY PLAN --------------------------------------------------------- LockRows -> Index Scan using yb_locks_t2_v_idx on yb_locks_t2 @@ -306,7 +306,7 @@ SELECT * FROM yb_locks_t2 WHERE v=4 FOR UPDATE; (3 rows) SELECT * FROM yb_locks_t2 WHERE v=4 FOR UPDATE; - k1 | k2 | k3 | v + k1 | k2 | k3 | v ----+----+----+--- 1 | 2 | 3 | 4 (1 row) @@ -314,7 +314,7 @@ SELECT * FROM yb_locks_t2 WHERE v=4 FOR UPDATE; -- Test only the indexed column. EXPLAIN (COSTS OFF) SELECT v FROM yb_locks_t2 WHERE v=4 FOR UPDATE; - QUERY PLAN + QUERY PLAN --------------------------------------------------------- LockRows -> Index Scan using yb_locks_t2_v_idx on yb_locks_t2 @@ -322,7 +322,7 @@ SELECT v FROM yb_locks_t2 WHERE v=4 FOR UPDATE; (3 rows) SELECT v FROM yb_locks_t2 WHERE v=4 FOR UPDATE; - v + v --- 4 (1 row) @@ -331,7 +331,7 @@ SELECT v FROM yb_locks_t2 WHERE v=4 FOR UPDATE; BEGIN ISOLATION LEVEL SERIALIZABLE; EXPLAIN (COSTS OFF) SELECT * FROM yb_locks_t2 WHERE v=4 FOR UPDATE; - QUERY PLAN + QUERY PLAN ----------------------------------------------------------------------------- LockRows (no-op) -> Index Scan (Locked FOR UPDATE) using yb_locks_t2_v_idx on yb_locks_t2 @@ -339,7 +339,7 @@ SELECT * FROM yb_locks_t2 WHERE v=4 FOR UPDATE; (3 rows) SELECT * FROM yb_locks_t2 WHERE v=4 FOR UPDATE; - k1 | k2 | k3 | v + k1 | k2 | k3 | v ----+----+----+--- 1 | 2 | 3 | 4 (1 row) @@ -350,7 +350,7 @@ CREATE TABLE yb_locks_partition (a char PRIMARY KEY) PARTITION BY LIST (a); CREATE TABLE yb_locks_partition_default PARTITION OF yb_locks_partition DEFAULT; CREATE TABLE yb_locks_partition_a PARTITION OF yb_locks_partition FOR VALUES IN ('a'); EXPLAIN (COSTS OFF) SELECT * FROM yb_locks_partition WHERE a = 'a' FOR UPDATE; - QUERY PLAN + QUERY PLAN -------------------------------------------------------------------------------- LockRows -> Append @@ -359,7 +359,7 @@ EXPLAIN (COSTS OFF) SELECT * FROM yb_locks_partition WHERE a = 'a' FOR UPDATE; (4 rows) EXPLAIN (COSTS OFF) SELECT * FROM yb_locks_partition WHERE a = 'b' FOR UPDATE; - QUERY PLAN + QUERY PLAN -------------------------------------------------------------------------------------------- LockRows -> Append @@ -369,7 +369,7 @@ EXPLAIN (COSTS OFF) SELECT * FROM yb_locks_partition WHERE a = 'b' FOR UPDATE; BEGIN ISOLATION LEVEL SERIALIZABLE; EXPLAIN (COSTS OFF) SELECT * FROM yb_locks_partition WHERE a = 'a' FOR UPDATE; - QUERY PLAN + QUERY PLAN ---------------------------------------------------------------------------------------------------- LockRows (no-op) -> Append @@ -381,7 +381,7 @@ COMMIT; -- Test JSON. EXPLAIN (COSTS OFF, FORMAT JSON) SELECT * FROM yb_locks_t WHERE k=5 FOR UPDATE; - QUERY PLAN + QUERY PLAN ---------------------------------------- [ + { + @@ -406,7 +406,7 @@ SET yb_lock_pk_single_rpc TO OFF; SET yb_test_planner_custom_plan_threshold to 1; PREPARE yb_locks_plan_rr (int) AS SELECT * FROM yb_locks_t WHERE k=$1 FOR UPDATE; EXECUTE yb_locks_plan_rr(1); - k + k --- 1 (1 row) @@ -414,7 +414,7 @@ EXECUTE yb_locks_plan_rr(1); -- The $1 in the EXPLAIN output tells you it's a stored plan. EXPLAIN (COSTS OFF) EXECUTE yb_locks_plan_rr(1); - QUERY PLAN + QUERY PLAN ------------------------------------------------------ LockRows -> Index Scan using yb_locks_t_pkey on yb_locks_t @@ -423,7 +423,7 @@ EXECUTE yb_locks_plan_rr(1); BEGIN ISOLATION LEVEL SERIALIZABLE; EXECUTE yb_locks_plan_rr(1); - k + k --- 1 (1 row) @@ -431,7 +431,7 @@ EXECUTE yb_locks_plan_rr(1); -- The LockRows node has a "no-op" annotation. EXPLAIN (COSTS OFF) EXECUTE yb_locks_plan_rr(1); - QUERY PLAN + QUERY PLAN -------------------------------------------------------------------------- LockRows (no-op) -> Index Scan (Locked FOR UPDATE) using yb_locks_t_pkey on yb_locks_t @@ -441,7 +441,7 @@ EXECUTE yb_locks_plan_rr(1); -- In JSON mode, the LockRows node has an "Executes" field set to false. EXPLAIN (COSTS OFF, FORMAT JSON) EXECUTE yb_locks_plan_rr(1); - QUERY PLAN + QUERY PLAN -------------------------------------------- [ + { + @@ -474,14 +474,14 @@ SET yb_lock_pk_single_rpc TO ON; BEGIN ISOLATION LEVEL SERIALIZABLE; PREPARE yb_locks_plan_ser (int) AS SELECT * FROM yb_locks_t WHERE k=$1 FOR UPDATE; EXECUTE yb_locks_plan_ser(1); - k + k --- 1 (1 row) EXPLAIN (COSTS OFF) EXECUTE yb_locks_plan_ser(1); - QUERY PLAN + QUERY PLAN -------------------------------------------------------------------- Index Scan (Locked FOR UPDATE) using yb_locks_t_pkey on yb_locks_t Index Cond: (k = $1) @@ -489,14 +489,14 @@ EXECUTE yb_locks_plan_ser(1); COMMIT; EXECUTE yb_locks_plan_ser(1); - k + k --- 1 (1 row) EXPLAIN (COSTS OFF) EXECUTE yb_locks_plan_ser(1); - QUERY PLAN + QUERY PLAN -------------------------------------------------------------------- Index Scan (Locked FOR UPDATE) using yb_locks_t_pkey on yb_locks_t Index Cond: (k = $1) @@ -507,7 +507,7 @@ EXECUTE yb_locks_plan_ser(1); BEGIN ISOLATION LEVEL SERIALIZABLE; PREPARE yb_locks_plan_ser_all (int) AS SELECT * FROM yb_locks_t FOR UPDATE; EXECUTE yb_locks_plan_ser_all(1); - k + k --- 5 1 @@ -518,7 +518,7 @@ EXECUTE yb_locks_plan_ser_all(1); EXPLAIN (COSTS OFF) EXECUTE yb_locks_plan_ser_all(1); - QUERY PLAN + QUERY PLAN -------------------------------------------------- LockRows (no-op) -> Seq Scan (Locked FOR UPDATE) on yb_locks_t @@ -526,7 +526,7 @@ EXECUTE yb_locks_plan_ser_all(1); COMMIT; EXECUTE yb_locks_plan_ser_all(1); - k + k --- 5 1 @@ -537,7 +537,7 @@ EXECUTE yb_locks_plan_ser_all(1); EXPLAIN (COSTS OFF) EXECUTE yb_locks_plan_ser_all(1); - QUERY PLAN + QUERY PLAN ------------------------------ LockRows -> Seq Scan on yb_locks_t diff --git a/src/postgres/src/test/regress/expected/yb_extensions.out b/src/postgres/src/test/regress/expected/yb_extensions.out index 1a6d7d416bf7..038719bb3b0f 100644 --- a/src/postgres/src/test/regress/expected/yb_extensions.out +++ b/src/postgres/src/test/regress/expected/yb_extensions.out @@ -90,9 +90,9 @@ select pg_get_userbyid(userid),datname,query,calls,rows,shared_blks_hit,shared_b -- SeqScan forces YbSeqScan node with NodeTag near the end of the list in nodes.h explain (analyze, costs off, summary off, timing off) /*+SeqScan(test)*/ select a, b from test; - QUERY PLAN ---------------------------------------------- - YB Seq Scan on test (actual rows=2 loops=1) + QUERY PLAN +------------------------------------------ + Seq Scan on test (actual rows=2 loops=1) (1 row) -- GHI 14498: different queryid may indicate NodeTag added to the middle of the list diff --git a/src/postgres/src/test/regress/expected/yb_fetch_limits.out b/src/postgres/src/test/regress/expected/yb_fetch_limits.out index 1671df12a5ad..cad46af48967 100644 --- a/src/postgres/src/test/regress/expected/yb_fetch_limits.out +++ b/src/postgres/src/test/regress/expected/yb_fetch_limits.out @@ -32,23 +32,23 @@ EXPLAIN (ANALYZE, DIST, SUMMARY OFF, TIMING OFF, COSTS OFF) SELECT * FROM t_smal -- yb seq scan EXPLAIN (ANALYZE, DIST, SUMMARY OFF, TIMING OFF, COSTS OFF) /*+ SeqScan(t) */ SELECT * FROM t_large AS t; - QUERY PLAN ------------------------------------------------------ - YB Seq Scan on t_large t (actual rows=5000 loops=1) + QUERY PLAN +-------------------------------------------------- + Seq Scan on t_large t (actual rows=5000 loops=1) Storage Table Read Requests: 6 (2 rows) EXPLAIN (ANALYZE, DIST, SUMMARY OFF, TIMING OFF, COSTS OFF) /*+ SeqScan(t) */ SELECT * FROM t_medium AS t; - QUERY PLAN ------------------------------------------------------- - YB Seq Scan on t_medium t (actual rows=5000 loops=1) + QUERY PLAN +--------------------------------------------------- + Seq Scan on t_medium t (actual rows=5000 loops=1) Storage Table Read Requests: 6 (2 rows) EXPLAIN (ANALYZE, DIST, SUMMARY OFF, TIMING OFF, COSTS OFF) /*+ SeqScan(t) */ SELECT * FROM t_small AS t; - QUERY PLAN ------------------------------------------------------ - YB Seq Scan on t_small t (actual rows=5000 loops=1) + QUERY PLAN +-------------------------------------------------- + Seq Scan on t_small t (actual rows=5000 loops=1) Storage Table Read Requests: 6 (2 rows) @@ -134,23 +134,23 @@ EXPLAIN (ANALYZE, DIST, SUMMARY OFF, TIMING OFF, COSTS OFF) SELECT * FROM t_smal -- yb seq scan EXPLAIN (ANALYZE, DIST, SUMMARY OFF, TIMING OFF, COSTS OFF) /*+ SeqScan(t) */ SELECT * FROM t_large AS t; - QUERY PLAN ------------------------------------------------------ - YB Seq Scan on t_large t (actual rows=5000 loops=1) + QUERY PLAN +-------------------------------------------------- + Seq Scan on t_large t (actual rows=5000 loops=1) Storage Table Read Requests: 2500 (2 rows) EXPLAIN (ANALYZE, DIST, SUMMARY OFF, TIMING OFF, COSTS OFF) /*+ SeqScan(t) */ SELECT * FROM t_medium AS t; - QUERY PLAN ------------------------------------------------------- - YB Seq Scan on t_medium t (actual rows=5000 loops=1) + QUERY PLAN +--------------------------------------------------- + Seq Scan on t_medium t (actual rows=5000 loops=1) Storage Table Read Requests: 557 (2 rows) EXPLAIN (ANALYZE, DIST, SUMMARY OFF, TIMING OFF, COSTS OFF) /*+ SeqScan(t) */ SELECT * FROM t_small AS t; - QUERY PLAN ------------------------------------------------------ - YB Seq Scan on t_small t (actual rows=5000 loops=1) + QUERY PLAN +-------------------------------------------------- + Seq Scan on t_small t (actual rows=5000 loops=1) Storage Table Read Requests: 194 (2 rows) @@ -236,23 +236,23 @@ EXPLAIN (ANALYZE, DIST, SUMMARY OFF, TIMING OFF, COSTS OFF) SELECT * FROM t_smal -- yb seq scan EXPLAIN (ANALYZE, DIST, SUMMARY OFF, TIMING OFF, COSTS OFF) /*+ SeqScan(t) */ SELECT * FROM t_large AS t; - QUERY PLAN ------------------------------------------------------ - YB Seq Scan on t_large t (actual rows=5000 loops=1) + QUERY PLAN +-------------------------------------------------- + Seq Scan on t_large t (actual rows=5000 loops=1) Storage Table Read Requests: 6 (2 rows) EXPLAIN (ANALYZE, DIST, SUMMARY OFF, TIMING OFF, COSTS OFF) /*+ SeqScan(t) */ SELECT * FROM t_medium AS t; - QUERY PLAN ------------------------------------------------------- - YB Seq Scan on t_medium t (actual rows=5000 loops=1) + QUERY PLAN +--------------------------------------------------- + Seq Scan on t_medium t (actual rows=5000 loops=1) Storage Table Read Requests: 3 (2 rows) EXPLAIN (ANALYZE, DIST, SUMMARY OFF, TIMING OFF, COSTS OFF) /*+ SeqScan(t) */ SELECT * FROM t_small AS t; - QUERY PLAN ------------------------------------------------------ - YB Seq Scan on t_small t (actual rows=5000 loops=1) + QUERY PLAN +-------------------------------------------------- + Seq Scan on t_small t (actual rows=5000 loops=1) Storage Table Read Requests: 3 (2 rows) @@ -338,23 +338,23 @@ EXPLAIN (ANALYZE, DIST, SUMMARY OFF, TIMING OFF, COSTS OFF) SELECT * FROM t_smal -- yb seq scan EXPLAIN (ANALYZE, DIST, SUMMARY OFF, TIMING OFF, COSTS OFF) /*+ SeqScan(t) */ SELECT * FROM t_large AS t; - QUERY PLAN ------------------------------------------------------ - YB Seq Scan on t_large t (actual rows=5000 loops=1) + QUERY PLAN +-------------------------------------------------- + Seq Scan on t_large t (actual rows=5000 loops=1) Storage Table Read Requests: 12 (2 rows) EXPLAIN (ANALYZE, DIST, SUMMARY OFF, TIMING OFF, COSTS OFF) /*+ SeqScan(t) */ SELECT * FROM t_medium AS t; - QUERY PLAN ------------------------------------------------------- - YB Seq Scan on t_medium t (actual rows=5000 loops=1) + QUERY PLAN +--------------------------------------------------- + Seq Scan on t_medium t (actual rows=5000 loops=1) Storage Table Read Requests: 3 (2 rows) EXPLAIN (ANALYZE, DIST, SUMMARY OFF, TIMING OFF, COSTS OFF) /*+ SeqScan(t) */ SELECT * FROM t_small AS t; - QUERY PLAN ------------------------------------------------------ - YB Seq Scan on t_small t (actual rows=5000 loops=1) + QUERY PLAN +-------------------------------------------------- + Seq Scan on t_small t (actual rows=5000 loops=1) Storage Table Read Requests: 3 (2 rows) @@ -387,7 +387,7 @@ EXPLAIN (ANALYZE, DIST, SUMMARY OFF, TIMING OFF, COSTS OFF) SELECT * FROM t_smal (4 rows) EXPLAIN (ANALYZE, DIST, SUMMARY OFF, TIMING OFF, COSTS OFF) SELECT * FROM t_small WHERE v > '' LIMIT 1; - QUERY PLAN + QUERY PLAN ----------------------------------------------------------------------------- Limit (actual rows=1 loops=1) -> Index Scan using t_small_v_idx_asc on t_small (actual rows=1 loops=1) diff --git a/src/postgres/src/test/regress/expected/yb_functional_index_multiple_column.out b/src/postgres/src/test/regress/expected/yb_functional_index_multiple_column.out index aa8dde08a557..b02c7e2a8bb4 100644 --- a/src/postgres/src/test/regress/expected/yb_functional_index_multiple_column.out +++ b/src/postgres/src/test/regress/expected/yb_functional_index_multiple_column.out @@ -5,9 +5,9 @@ EXPLAIN (COSTS OFF, TIMING OFF, SUMMARY OFF, ANALYZE) SELECT yb_hash_code(x), y QUERY PLAN --------------------------------------- Seq Scan on t (actual rows=1 loops=1) + Remote Filter: (y > 4) Filter: (yb_hash_code(x) < 4000) Rows Removed by Filter: 5 - Remote Filter: (y > 4) (4 rows) EXPLAIN (COSTS OFF, TIMING OFF, SUMMARY OFF, ANALYZE) SELECT yb_hash_code(x), y FROM t WHERE yb_hash_code(x) = 2675 AND y IN (5, 6); @@ -29,9 +29,9 @@ EXPLAIN (COSTS OFF, TIMING OFF, SUMMARY OFF, ANALYZE) SELECT yb_hash_code(x), y QUERY PLAN --------------------------------------- Seq Scan on t (actual rows=1 loops=1) + Remote Filter: (y > 4) Filter: (yb_hash_code(x) = 2675) Rows Removed by Filter: 5 - Remote Filter: (y > 4) (4 rows) DROP INDEX t_hcx_hash_y_hash_idx; @@ -72,9 +72,9 @@ EXPLAIN (COSTS OFF, TIMING OFF, SUMMARY OFF, ANALYZE) SELECT yb_hash_code(x), y QUERY PLAN --------------------------------------- Seq Scan on t (actual rows=1 loops=1) + Remote Filter: (y > 4) Filter: (yb_hash_code(x) < 4000) Rows Removed by Filter: 5 - Remote Filter: (y > 4) (4 rows) EXPLAIN (COSTS OFF, TIMING OFF, SUMMARY OFF, ANALYZE) SELECT yb_hash_code(x), y FROM t WHERE yb_hash_code(x) = 2675 AND y IN (5, 6); @@ -106,9 +106,9 @@ EXPLAIN (COSTS OFF, TIMING OFF, SUMMARY OFF, ANALYZE) SELECT yb_hash_code(x), y QUERY PLAN --------------------------------------- Seq Scan on t (actual rows=1 loops=1) + Remote Filter: (y > 4) Filter: (yb_hash_code(x) < 4000) Rows Removed by Filter: 5 - Remote Filter: (y > 4) (4 rows) EXPLAIN (COSTS OFF, TIMING OFF, SUMMARY OFF, ANALYZE) SELECT yb_hash_code(x), y FROM t WHERE yb_hash_code(x) = 2675 AND y IN (5, 6); @@ -129,9 +129,9 @@ EXPLAIN (COSTS OFF, TIMING OFF, SUMMARY OFF, ANALYZE) SELECT yb_hash_code(x), y QUERY PLAN --------------------------------------- Seq Scan on t (actual rows=1 loops=1) + Remote Filter: (y > 4) Filter: (yb_hash_code(x) = 2675) Rows Removed by Filter: 5 - Remote Filter: (y > 4) (4 rows) DROP INDEX t_y_hash_hcx_asc_idx; @@ -265,9 +265,9 @@ EXPLAIN (COSTS OFF, TIMING OFF, SUMMARY OFF, ANALYZE) SELECT yb_hash_code(x), y QUERY PLAN --------------------------------------- Seq Scan on t (actual rows=1 loops=1) + Remote Filter: (y > 4) Filter: (yb_hash_code(x) < 4000) Rows Removed by Filter: 5 - Remote Filter: (y > 4) (4 rows) EXPLAIN (COSTS OFF, TIMING OFF, SUMMARY OFF, ANALYZE) SELECT yb_hash_code(x), y FROM t WHERE yb_hash_code(x) = 2675 AND y IN (5, 6); @@ -290,9 +290,9 @@ EXPLAIN (COSTS OFF, TIMING OFF, SUMMARY OFF, ANALYZE) SELECT yb_hash_code(x), y QUERY PLAN --------------------------------------- Seq Scan on t (actual rows=1 loops=1) + Remote Filter: (y > 4) Filter: (yb_hash_code(x) = 2675) Rows Removed by Filter: 5 - Remote Filter: (y > 4) (4 rows) DROP INDEX t_x_hash_y_hash_idx; @@ -323,9 +323,9 @@ EXPLAIN (COSTS OFF, TIMING OFF, SUMMARY OFF, ANALYZE) SELECT yb_hash_code(x), y QUERY PLAN --------------------------------------- Seq Scan on t (actual rows=1 loops=1) + Remote Filter: (y > 4) Filter: (yb_hash_code(x) < 4000) Rows Removed by Filter: 5 - Remote Filter: (y > 4) (4 rows) EXPLAIN (COSTS OFF, TIMING OFF, SUMMARY OFF, ANALYZE) SELECT yb_hash_code(x), y FROM t WHERE yb_hash_code(x) = 2675 AND y IN (5, 6); @@ -352,9 +352,9 @@ EXPLAIN (COSTS OFF, TIMING OFF, SUMMARY OFF, ANALYZE) SELECT yb_hash_code(x), y QUERY PLAN --------------------------------------- Seq Scan on t (actual rows=1 loops=1) + Remote Filter: (y > 4) Filter: (yb_hash_code(x) = 2675) Rows Removed by Filter: 5 - Remote Filter: (y > 4) (4 rows) DROP INDEX t_y_hash_x_asc_idx; diff --git a/src/postgres/src/test/regress/expected/yb_index_scan_null_hash.out b/src/postgres/src/test/regress/expected/yb_index_scan_null_hash.out index 3e20718fcdba..5881b3443f42 100644 --- a/src/postgres/src/test/regress/expected/yb_index_scan_null_hash.out +++ b/src/postgres/src/test/regress/expected/yb_index_scan_null_hash.out @@ -28,30 +28,30 @@ DEBUG: skipping a scan due to unsatisfiable condition EXPLAIN (ANALYZE, COSTS OFF, DIST ON, TIMING OFF, SUMMARY OFF) /*+ IndexScan(t1) NestLoop(t2 t1) Leading((t2 t1)) */ SELECT * FROM nulltest t1 JOIN nulltest2 t2 ON t1.a <= t2.x; - QUERY PLAN ----------------------------------------------------------------- + QUERY PLAN +------------------------------------------------------------- Nested Loop (actual rows=0 loops=1) Join Filter: (t1.a <= t2.x) Rows Removed by Join Filter: 4 -> Seq Scan on nulltest2 t2 (actual rows=1 loops=1) Storage Table Read Requests: 3 -> Materialize (actual rows=4 loops=1) - -> YB Seq Scan on nulltest t1 (actual rows=4 loops=1) + -> Seq Scan on nulltest t1 (actual rows=4 loops=1) Storage Table Read Requests: 3 (8 rows) EXPLAIN (ANALYZE, COSTS OFF, DIST ON, TIMING OFF, SUMMARY OFF) /*+ IndexScan(t1) NestLoop(t2 t1) Leading((t2 t1)) */ SELECT * FROM nulltest t1 JOIN nulltest2 t2 ON t1.a BETWEEN t2.x AND t2.x + 2; - QUERY PLAN ----------------------------------------------------------------- + QUERY PLAN +------------------------------------------------------------- Nested Loop (actual rows=0 loops=1) Join Filter: ((t1.a >= t2.x) AND (t1.a <= (t2.x + 2))) Rows Removed by Join Filter: 4 -> Seq Scan on nulltest2 t2 (actual rows=1 loops=1) Storage Table Read Requests: 3 -> Materialize (actual rows=4 loops=1) - -> YB Seq Scan on nulltest t1 (actual rows=4 loops=1) + -> Seq Scan on nulltest t1 (actual rows=4 loops=1) Storage Table Read Requests: 3 (8 rows) @@ -71,24 +71,24 @@ DEBUG: skipping a scan due to unsatisfiable condition EXPLAIN (ANALYZE, COSTS OFF, DIST ON, TIMING OFF, SUMMARY OFF) /*+ IndexScan(t1) NestLoop(t2 t1) Leading((t2 t1)) */ SELECT * FROM nulltest t1 JOIN nulltest2 t2 ON (t1.a, t1.b) <= (t2.x, t2.y); - QUERY PLAN ----------------------------------------------------------------- + QUERY PLAN +------------------------------------------------------------- Nested Loop (actual rows=0 loops=1) Join Filter: (ROW(t1.a, t1.b) <= ROW(t2.x, t2.y)) Rows Removed by Join Filter: 4 -> Seq Scan on nulltest2 t2 (actual rows=1 loops=1) Storage Table Read Requests: 3 -> Materialize (actual rows=4 loops=1) - -> YB Seq Scan on nulltest t1 (actual rows=4 loops=1) + -> Seq Scan on nulltest t1 (actual rows=4 loops=1) Storage Table Read Requests: 3 (8 rows) EXPLAIN (ANALYZE, COSTS OFF, DIST ON, TIMING OFF, SUMMARY OFF) /*+ IndexScan(t1) */ SELECT * FROM nulltest t1 WHERE (a, b) <= (null, 1); - QUERY PLAN ----------------------------------------------------- - YB Seq Scan on nulltest t1 (actual rows=0 loops=1) + QUERY PLAN +------------------------------------------------- + Seq Scan on nulltest t1 (actual rows=0 loops=1) Filter: (ROW(a, b) <= ROW(NULL::integer, 1)) Rows Removed by Filter: 4 Storage Table Read Requests: 3 @@ -97,9 +97,9 @@ SELECT * FROM nulltest t1 WHERE (a, b) <= (null, 1); EXPLAIN (ANALYZE, COSTS OFF, DIST ON, TIMING OFF, SUMMARY OFF) /*+ IndexScan(t1 i_nulltest_ba) */ SELECT * FROM nulltest t1 WHERE (a, b) <= (null, 1); - QUERY PLAN ----------------------------------------------------- - YB Seq Scan on nulltest t1 (actual rows=0 loops=1) + QUERY PLAN +------------------------------------------------- + Seq Scan on nulltest t1 (actual rows=0 loops=1) Filter: (ROW(a, b) <= ROW(NULL::integer, 1)) Rows Removed by Filter: 4 Storage Table Read Requests: 3 @@ -177,9 +177,9 @@ SELECT a FROM nulltest t1 WHERE (a, b) <= (2, null); EXPLAIN (ANALYZE, COSTS OFF, DIST ON, TIMING OFF, SUMMARY OFF) /*+ IndexScan(t1) */ SELECT a FROM nulltest t1 WHERE (a, b) <= (2, null); - QUERY PLAN ----------------------------------------------------- - YB Seq Scan on nulltest t1 (actual rows=2 loops=1) + QUERY PLAN +------------------------------------------------- + Seq Scan on nulltest t1 (actual rows=2 loops=1) Filter: (ROW(a, b) <= ROW(2, NULL::integer)) Rows Removed by Filter: 2 Storage Table Read Requests: 3 @@ -196,9 +196,9 @@ SELECT a FROM nulltest t1 WHERE (a, b) <= (2, null); EXPLAIN (ANALYZE, COSTS OFF, DIST ON, TIMING OFF, SUMMARY OFF) /*+ IndexScan(t1 i_nulltest_ba) */ SELECT a FROM nulltest t1 WHERE (a, b) <= (2, null); - QUERY PLAN ----------------------------------------------------- - YB Seq Scan on nulltest t1 (actual rows=2 loops=1) + QUERY PLAN +------------------------------------------------- + Seq Scan on nulltest t1 (actual rows=2 loops=1) Filter: (ROW(a, b) <= ROW(2, NULL::integer)) Rows Removed by Filter: 2 Storage Table Read Requests: 3 diff --git a/src/postgres/src/test/regress/expected/yb_internal_subtransactions.out b/src/postgres/src/test/regress/expected/yb_internal_subtransactions.out index 9691a83c8a11..8180322abc93 100644 --- a/src/postgres/src/test/regress/expected/yb_internal_subtransactions.out +++ b/src/postgres/src/test/regress/expected/yb_internal_subtransactions.out @@ -44,7 +44,7 @@ SELECT /*+ SeqScan(t) */ * FROM subtrans_foo t WHERE k > 0 AND v > 0 ORDER BY k; ---------------------------------------------- Sort Sort Key: k - -> YB Seq Scan on subtrans_foo t + -> Seq Scan on subtrans_foo t Remote Filter: ((k > 0) AND (v > 0)) (4 rows) @@ -61,7 +61,7 @@ SELECT /*+ IndexScan(t subtrans_foo_pkey) */ * FROM subtrans_foo t WHERE k > 0 A ---------------------------------------------- Sort Sort Key: k - -> YB Seq Scan on subtrans_foo t + -> Seq Scan on subtrans_foo t Remote Filter: ((k > 0) AND (v > 0)) (4 rows) @@ -78,7 +78,7 @@ SELECT /*+ IndexScan(t subtrans_foo_v_key) */ * FROM subtrans_foo t WHERE k > 0 ---------------------------------------------- Sort Sort Key: k - -> YB Seq Scan on subtrans_foo t + -> Seq Scan on subtrans_foo t Remote Filter: ((k > 0) AND (v > 0)) (4 rows) diff --git a/src/postgres/src/test/regress/expected/yb_is_local_table.out b/src/postgres/src/test/regress/expected/yb_is_local_table.out index 0362576e2063..20b656a4741f 100644 --- a/src/postgres/src/test/regress/expected/yb_is_local_table.out +++ b/src/postgres/src/test/regress/expected/yb_is_local_table.out @@ -217,11 +217,11 @@ EXPLAIN (COSTS OFF) SELECT * FROM multikey WHERE a < 2 AND yb_is_local_table(tab --------------------------------------------- Append -> Seq Scan on multikey1_local - Filter: yb_is_local_table(tableoid) Remote Filter: (a < 2) - -> Seq Scan on multikey_default_local Filter: yb_is_local_table(tableoid) + -> Seq Scan on multikey_default_local Remote Filter: (a < 2) + Filter: yb_is_local_table(tableoid) (7 rows) -- Query with both partition keys. @@ -230,8 +230,8 @@ EXPLAIN (COSTS OFF) SELECT * FROM multikey WHERE a = 2 AND b < 1 AND yb_is_local ---------------------------------------------- Append -> Seq Scan on multikey3_local - Filter: yb_is_local_table(tableoid) Remote Filter: ((b < 1) AND (a = 2)) + Filter: yb_is_local_table(tableoid) (4 rows) -- Query with null check. @@ -240,8 +240,8 @@ EXPLAIN (COSTS OFF) SELECT * FROM multikey WHERE b is null AND yb_is_local_table --------------------------------------------- Append -> Seq Scan on multikey_default_local - Filter: yb_is_local_table(tableoid) Remote Filter: (b IS NULL) + Filter: yb_is_local_table(tableoid) (4 rows) -- Sanity Test for 3 types of JOINs. @@ -268,8 +268,8 @@ SELECT t1.a, t2.b FROM prt1 t1, prt2 t2 WHERE t1.a = t2.b AND t1.a < 450 AND yb_ Sort Key: t1.a -> Append -> Seq Scan on prt1_p2_local t1 - Filter: yb_is_local_table(tableoid) Remote Filter: (a < 450) + Filter: yb_is_local_table(tableoid) -> Sort Sort Key: t2.b -> Append diff --git a/src/postgres/src/test/regress/expected/yb_no_explicit_target.out b/src/postgres/src/test/regress/expected/yb_no_explicit_target.out index 2cacd40cf880..5c56e6574af8 100644 --- a/src/postgres/src/test/regress/expected/yb_no_explicit_target.out +++ b/src/postgres/src/test/regress/expected/yb_no_explicit_target.out @@ -5,9 +5,9 @@ INSERT INTO t_kv VALUES (11, 1); -- test duplicate key INSERT INTO t_kv VALUES (12, NULL); -- test null values -- yb seq scan EXPLAIN (ANALYZE, COSTS OFF, TIMING OFF, SUMMARY OFF) /*+ SeqScan(t_kv) */ SELECT k FROM t_kv; - QUERY PLAN ----------------------------------------------- - YB Seq Scan on t_kv (actual rows=12 loops=1) + QUERY PLAN +------------------------------------------- + Seq Scan on t_kv (actual rows=12 loops=1) (1 row) /*+ SeqScan(t_kv) */ SELECT k FROM t_kv; @@ -28,9 +28,9 @@ EXPLAIN (ANALYZE, COSTS OFF, TIMING OFF, SUMMARY OFF) /*+ SeqScan(t_kv) */ SELEC (12 rows) EXPLAIN (ANALYZE, COSTS OFF, TIMING OFF, SUMMARY OFF) /*+ SeqScan(t_kv) */ SELECT FROM t_kv; - QUERY PLAN ----------------------------------------------- - YB Seq Scan on t_kv (actual rows=12 loops=1) + QUERY PLAN +------------------------------------------- + Seq Scan on t_kv (actual rows=12 loops=1) (1 row) /*+ SeqScan(t_kv) */ SELECT FROM t_kv; @@ -38,10 +38,10 @@ EXPLAIN (ANALYZE, COSTS OFF, TIMING OFF, SUMMARY OFF) /*+ SeqScan(t_kv) */ SELEC (12 rows) EXPLAIN (ANALYZE, COSTS OFF, TIMING OFF, SUMMARY OFF) /*+ SeqScan(t_kv) */ SELECT count(1) FROM t_kv; - QUERY PLAN ---------------------------------------------------- + QUERY PLAN +------------------------------------------------ Finalize Aggregate (actual rows=1 loops=1) - -> YB Seq Scan on t_kv (actual rows=1 loops=1) + -> Seq Scan on t_kv (actual rows=1 loops=1) Partial Aggregate: true (3 rows) @@ -52,10 +52,10 @@ EXPLAIN (ANALYZE, COSTS OFF, TIMING OFF, SUMMARY OFF) /*+ SeqScan(t_kv) */ SELEC (1 row) EXPLAIN (ANALYZE, COSTS OFF, TIMING OFF, SUMMARY OFF) /*+ SeqScan(t_kv) */ SELECT count(*) FROM t_kv; - QUERY PLAN ---------------------------------------------------- + QUERY PLAN +------------------------------------------------ Finalize Aggregate (actual rows=1 loops=1) - -> YB Seq Scan on t_kv (actual rows=1 loops=1) + -> Seq Scan on t_kv (actual rows=1 loops=1) Partial Aggregate: true (3 rows) @@ -66,9 +66,9 @@ EXPLAIN (ANALYZE, COSTS OFF, TIMING OFF, SUMMARY OFF) /*+ SeqScan(t_kv) */ SELEC (1 row) EXPLAIN (ANALYZE, COSTS OFF, TIMING OFF, SUMMARY OFF) /*+ SeqScan(t_kv) */ SELECT 1 FROM t_kv; - QUERY PLAN ----------------------------------------------- - YB Seq Scan on t_kv (actual rows=12 loops=1) + QUERY PLAN +------------------------------------------- + Seq Scan on t_kv (actual rows=12 loops=1) (1 row) /*+ SeqScan(t_kv) */ SELECT 1 FROM t_kv; @@ -186,9 +186,9 @@ EXPLAIN (ANALYZE, COSTS OFF, TIMING OFF, SUMMARY OFF) /*+ IndexOnlyScan(t_kv) */ (12 rows) EXPLAIN (ANALYZE, COSTS OFF, TIMING OFF, SUMMARY OFF) /*+ IndexOnlyScan(t_kv) */ SELECT k FROM t_kv; - QUERY PLAN ----------------------------------------------- - YB Seq Scan on t_kv (actual rows=12 loops=1) + QUERY PLAN +------------------------------------------- + Seq Scan on t_kv (actual rows=12 loops=1) (1 row) /*+ IndexOnlyScan(t_kv) */ SELECT k FROM t_kv; @@ -276,9 +276,9 @@ EXPLAIN (ANALYZE, COSTS OFF, TIMING OFF, SUMMARY OFF) /*+ IndexOnlyScan(t_kv t_v (12 rows) EXPLAIN (ANALYZE, COSTS OFF, TIMING OFF, SUMMARY OFF) /*+ IndexOnlyScan(t_kv t_vi) */ SELECT k FROM t_kv; - QUERY PLAN ----------------------------------------------- - YB Seq Scan on t_kv (actual rows=12 loops=1) + QUERY PLAN +------------------------------------------- + Seq Scan on t_kv (actual rows=12 loops=1) (1 row) /*+ IndexOnlyScan(t_kv t_vi) */ SELECT k FROM t_kv; @@ -379,10 +379,10 @@ SELECT * FROM t_kv; -- yb seq scan EXPLAIN (ANALYZE, COSTS OFF, TIMING OFF, SUMMARY OFF) /*+ SeqScan(t_kv) */ DELETE FROM t_kv; - QUERY PLAN ----------------------------------------------------- + QUERY PLAN +------------------------------------------------- Delete on t_kv (actual rows=0 loops=1) - -> YB Seq Scan on t_kv (actual rows=10 loops=1) + -> Seq Scan on t_kv (actual rows=10 loops=1) (2 rows) INSERT INTO t_kv SELECT x, x FROM generate_series(1, 10) AS x; @@ -403,10 +403,10 @@ INSERT INTO t_kv SELECT x, x FROM generate_series(1, 10) AS x; -- index only scan on the primary index EXPLAIN (ANALYZE, COSTS OFF, TIMING OFF, SUMMARY OFF) /*+ IndexOnlyScan(t_kv t_kv_pkey) */ DELETE FROM t_kv; - QUERY PLAN ----------------------------------------------------- + QUERY PLAN +------------------------------------------------- Delete on t_kv (actual rows=0 loops=1) - -> YB Seq Scan on t_kv (actual rows=10 loops=1) + -> Seq Scan on t_kv (actual rows=10 loops=1) (2 rows) INSERT INTO t_kv SELECT x, x FROM generate_series(1, 10) AS x; @@ -427,10 +427,10 @@ INSERT INTO t_kv SELECT x, x FROM generate_series(1, 10) AS x; -- index only scan on the secondary index EXPLAIN (ANALYZE, COSTS OFF, TIMING OFF, SUMMARY OFF) /*+ IndexOnlyScan(t_kv t_vi) */ DELETE FROM t_kv; - QUERY PLAN ----------------------------------------------------- + QUERY PLAN +------------------------------------------------- Delete on t_kv (actual rows=0 loops=1) - -> YB Seq Scan on t_kv (actual rows=10 loops=1) + -> Seq Scan on t_kv (actual rows=10 loops=1) (2 rows) INSERT INTO t_kv SELECT x, x FROM generate_series(1, 10) AS x; diff --git a/src/postgres/src/test/regress/expected/yb_pg_partition_prune.out b/src/postgres/src/test/regress/expected/yb_pg_partition_prune.out index 443fbfe7b3da..51bf5a5b5f36 100644 --- a/src/postgres/src/test/regress/expected/yb_pg_partition_prune.out +++ b/src/postgres/src/test/regress/expected/yb_pg_partition_prune.out @@ -389,8 +389,8 @@ explain (costs off) select * from rlp where a = 16 and b in ('not', 'in', 'here' ------------------------------------------------------------- Append -> Seq Scan on rlp3_default - Filter: ((b)::text = ANY ('{not,in,here}'::text[])) Remote Filter: (a = 16) + Filter: ((b)::text = ANY ('{not,in,here}'::text[])) (4 rows) explain (costs off) select * from rlp where a = 16 and b < 'ab'; @@ -600,7 +600,7 @@ explain (costs off) select * from rlp where a >= 29; (11 rows) explain (costs off) select * from rlp where a < 1 or (a > 20 and a < 25); - QUERY PLAN + QUERY PLAN ------------------------------------------------------------- Append -> Seq Scan on rlp1 @@ -2544,8 +2544,8 @@ explain (analyze, costs off, summary off, timing off) execute q1 (1,2,2,0); Append (actual rows=0 loops=1) Subplans Removed: 1 -> Seq Scan on listp_1_1 (actual rows=0 loops=1) - Filter: (b = ANY (ARRAY[$1, $2])) Remote Filter: (($3 <> b) AND ($4 <> b)) + Filter: (b = ANY (ARRAY[$1, $2])) (5 rows) -- Both partitions allowed by IN clause, then both excluded again by <> clauses. @@ -2556,8 +2556,8 @@ explain (analyze, costs off, summary off, timing off) execute q1 (1,2,2,1); Append (actual rows=0 loops=1) Subplans Removed: 1 -> Seq Scan on listp_1_1 (never executed) - Filter: (b = ANY (ARRAY[$1, $2])) Remote Filter: (($3 <> b) AND ($4 <> b)) + Filter: (b = ANY (ARRAY[$1, $2])) (5 rows) -- Ensure Params that evaluate to NULL properly prune away all partitions diff --git a/src/postgres/src/test/regress/expected/yb_pg_rowsecurity.out b/src/postgres/src/test/regress/expected/yb_pg_rowsecurity.out index 32f7ee95fbbb..f75c2d12877e 100644 --- a/src/postgres/src/test/regress/expected/yb_pg_rowsecurity.out +++ b/src/postgres/src/test/regress/expected/yb_pg_rowsecurity.out @@ -297,8 +297,8 @@ EXPLAIN (COSTS OFF) SELECT * FROM document WHERE f_leak(dtitle); QUERY PLAN ---------------------------------------------------- Seq Scan on document - Filter: f_leak(dtitle) Remote Filter: (dlevel <= $0) + Filter: f_leak(dtitle) InitPlan 1 (returns $0) -> Index Scan using uaccount_pkey on uaccount Index Cond: (pguser = CURRENT_USER) @@ -312,8 +312,8 @@ EXPLAIN (COSTS OFF) SELECT * FROM document NATURAL JOIN category WHERE f_leak(dt -> Index Scan using uaccount_pkey on uaccount Index Cond: (pguser = CURRENT_USER) -> Seq Scan on document - Filter: f_leak(dtitle) Remote Filter: (dlevel <= $0) + Filter: f_leak(dtitle) -> Index Scan using category_pkey on category Index Cond: (cid = document.cid) (9 rows) @@ -362,8 +362,8 @@ EXPLAIN (COSTS OFF) SELECT * FROM document WHERE f_leak(dtitle); QUERY PLAN ---------------------------------------------------------------------------------- Seq Scan on document - Filter: f_leak(dtitle) Remote Filter: ((cid <> 44) AND (cid <> 44) AND (cid < 50) AND (dlevel <= $0)) + Filter: f_leak(dtitle) InitPlan 1 (returns $0) -> Index Scan using uaccount_pkey on uaccount Index Cond: (pguser = CURRENT_USER) @@ -377,8 +377,8 @@ EXPLAIN (COSTS OFF) SELECT * FROM document NATURAL JOIN category WHERE f_leak(dt -> Index Scan using uaccount_pkey on uaccount Index Cond: (pguser = CURRENT_USER) -> Seq Scan on document - Filter: f_leak(dtitle) Remote Filter: ((cid <> 44) AND (cid <> 44) AND (cid < 50) AND (dlevel <= $0)) + Filter: f_leak(dtitle) -> Index Scan using category_pkey on category Index Cond: (cid = document.cid) (9 rows) @@ -723,8 +723,8 @@ EXPLAIN (COSTS OFF) SELECT * FROM t1 WHERE f_leak(b); QUERY PLAN -------------------------------- Seq Scan on t1 - Filter: f_leak(b) Remote Filter: ((a % 2) = 0) + Filter: f_leak(b) (3 rows) -- reference to system column @@ -784,8 +784,8 @@ EXPLAIN (COSTS OFF) SELECT * FROM t1 WHERE f_leak(b) FOR SHARE; -------------------------------------- LockRows -> Seq Scan on t1 - Filter: f_leak(b) Remote Filter: ((a % 2) = 0) + Filter: f_leak(b) (4 rows) -- union all query @@ -1055,8 +1055,8 @@ EXPLAIN (COSTS OFF) SELECT * FROM part_document WHERE f_leak(dtitle); -> Index Scan using uaccount_pkey on uaccount Index Cond: (pguser = CURRENT_USER) -> Seq Scan on part_document_fiction - Filter: f_leak(dtitle) Remote Filter: ((cid < 55) AND (dlevel <= $0)) + Filter: f_leak(dtitle) (7 rows) -- viewpoint from regress_rls_carol @@ -1096,14 +1096,14 @@ EXPLAIN (COSTS OFF) SELECT * FROM part_document WHERE f_leak(dtitle); -> Index Scan using uaccount_pkey on uaccount Index Cond: (pguser = CURRENT_USER) -> Seq Scan on part_document_fiction - Filter: f_leak(dtitle) Remote Filter: (dlevel <= $0) - -> Seq Scan on part_document_satire Filter: f_leak(dtitle) + -> Seq Scan on part_document_satire Remote Filter: (dlevel <= $0) - -> Seq Scan on part_document_nonfiction Filter: f_leak(dtitle) + -> Seq Scan on part_document_nonfiction Remote Filter: (dlevel <= $0) + Filter: f_leak(dtitle) (13 rows) -- only owner can change policies @@ -1507,8 +1507,8 @@ EXPLAIN (COSTS OFF) UPDATE t1 SET b = b || b WHERE f_leak(b); -------------------------------------- Update on t1 -> Seq Scan on t1 - Filter: f_leak(b) Remote Filter: ((a % 2) = 0) + Filter: f_leak(b) (4 rows) UPDATE t1 SET b = b || b WHERE f_leak(b); @@ -1519,8 +1519,8 @@ EXPLAIN (COSTS OFF) UPDATE only t1 SET b = b || '_updt' WHERE f_leak(b); -------------------------------------- Update on t1 -> Seq Scan on t1 - Filter: f_leak(b) Remote Filter: ((a % 2) = 0) + Filter: f_leak(b) (4 rows) UPDATE only t1 SET b = b || '_updt' WHERE f_leak(b); @@ -1599,13 +1599,13 @@ AND f_leak(t1_1.b) AND f_leak(t1_2.b) RETURNING *, t1_1, t1_2; -> Sort Sort Key: t1_1.b -> Seq Scan on t1 t1_1 - Filter: f_leak(b) Remote Filter: ((a = 4) AND ((a % 2) = 0)) + Filter: f_leak(b) -> Sort Sort Key: t1_2.b -> Seq Scan on t1 t1_2 - Filter: f_leak(b) Remote Filter: ((a = 4) AND ((a % 2) = 0)) + Filter: f_leak(b) (13 rows) UPDATE t1 t1_1 SET b = t1_2.b FROM t1 t1_2 @@ -1636,8 +1636,8 @@ EXPLAIN (COSTS OFF) DELETE FROM only t1 WHERE f_leak(b); -------------------------------------- Delete on t1 -> Seq Scan on t1 - Filter: f_leak(b) Remote Filter: ((a % 2) = 0) + Filter: f_leak(b) (4 rows) EXPLAIN (COSTS OFF) DELETE FROM t1 WHERE f_leak(b); @@ -1645,8 +1645,8 @@ EXPLAIN (COSTS OFF) DELETE FROM t1 WHERE f_leak(b); -------------------------------------- Delete on t1 -> Seq Scan on t1 - Filter: f_leak(b) Remote Filter: ((a % 2) = 0) + Filter: f_leak(b) (4 rows) DELETE FROM only t1 WHERE f_leak(b) RETURNING *, t1; @@ -1907,8 +1907,8 @@ EXPLAIN (COSTS OFF) SELECT * FROM z1 WHERE f_leak(b); QUERY PLAN -------------------------------- Seq Scan on z1 - Filter: f_leak(b) Remote Filter: ((a % 2) = 0) + Filter: f_leak(b) (3 rows) PREPARE plancache_test AS SELECT * FROM z1 WHERE f_leak(b); @@ -1916,8 +1916,8 @@ EXPLAIN (COSTS OFF) EXECUTE plancache_test; QUERY PLAN -------------------------------- Seq Scan on z1 - Filter: f_leak(b) Remote Filter: ((a % 2) = 0) + Filter: f_leak(b) (3 rows) PREPARE plancache_test2 AS WITH q AS (SELECT * FROM z1 WHERE f_leak(b)) SELECT * FROM q,z2; @@ -1927,8 +1927,8 @@ EXPLAIN (COSTS OFF) EXECUTE plancache_test2; Nested Loop CTE q -> Seq Scan on z1 - Filter: f_leak(b) Remote Filter: ((a % 2) = 0) + Filter: f_leak(b) -> CTE Scan on q -> Materialize -> Seq Scan on z2 @@ -1944,8 +1944,8 @@ EXPLAIN (COSTS OFF) EXECUTE plancache_test3; -> CTE Scan on q -> Materialize -> Seq Scan on z1 - Filter: f_leak(b) Remote Filter: ((a % 2) = 0) + Filter: f_leak(b) (8 rows) SET ROLE regress_rls_group1; @@ -1962,16 +1962,16 @@ EXPLAIN (COSTS OFF) SELECT * FROM z1 WHERE f_leak(b); QUERY PLAN -------------------------------- Seq Scan on z1 - Filter: f_leak(b) Remote Filter: ((a % 2) = 0) + Filter: f_leak(b) (3 rows) EXPLAIN (COSTS OFF) EXECUTE plancache_test; QUERY PLAN -------------------------------- Seq Scan on z1 - Filter: f_leak(b) Remote Filter: ((a % 2) = 0) + Filter: f_leak(b) (3 rows) EXPLAIN (COSTS OFF) EXECUTE plancache_test2; @@ -1980,8 +1980,8 @@ EXPLAIN (COSTS OFF) EXECUTE plancache_test2; Nested Loop CTE q -> Seq Scan on z1 - Filter: f_leak(b) Remote Filter: ((a % 2) = 0) + Filter: f_leak(b) -> CTE Scan on q -> Materialize -> Seq Scan on z2 @@ -1996,8 +1996,8 @@ EXPLAIN (COSTS OFF) EXECUTE plancache_test3; -> CTE Scan on q -> Materialize -> Seq Scan on z1 - Filter: f_leak(b) Remote Filter: ((a % 2) = 0) + Filter: f_leak(b) (8 rows) SET SESSION AUTHORIZATION regress_rls_carol; @@ -2014,16 +2014,16 @@ EXPLAIN (COSTS OFF) SELECT * FROM z1 WHERE f_leak(b); QUERY PLAN -------------------------------- Seq Scan on z1 - Filter: f_leak(b) Remote Filter: ((a % 2) = 1) + Filter: f_leak(b) (3 rows) EXPLAIN (COSTS OFF) EXECUTE plancache_test; QUERY PLAN -------------------------------- Seq Scan on z1 - Filter: f_leak(b) Remote Filter: ((a % 2) = 1) + Filter: f_leak(b) (3 rows) EXPLAIN (COSTS OFF) EXECUTE plancache_test2; @@ -2032,8 +2032,8 @@ EXPLAIN (COSTS OFF) EXECUTE plancache_test2; Nested Loop CTE q -> Seq Scan on z1 - Filter: f_leak(b) Remote Filter: ((a % 2) = 1) + Filter: f_leak(b) -> CTE Scan on q -> Materialize -> Seq Scan on z2 @@ -2048,8 +2048,8 @@ EXPLAIN (COSTS OFF) EXECUTE plancache_test3; -> CTE Scan on q -> Materialize -> Seq Scan on z1 - Filter: f_leak(b) Remote Filter: ((a % 2) = 1) + Filter: f_leak(b) (8 rows) SET ROLE regress_rls_group2; @@ -2066,16 +2066,16 @@ EXPLAIN (COSTS OFF) SELECT * FROM z1 WHERE f_leak(b); QUERY PLAN -------------------------------- Seq Scan on z1 - Filter: f_leak(b) Remote Filter: ((a % 2) = 1) + Filter: f_leak(b) (3 rows) EXPLAIN (COSTS OFF) EXECUTE plancache_test; QUERY PLAN -------------------------------- Seq Scan on z1 - Filter: f_leak(b) Remote Filter: ((a % 2) = 1) + Filter: f_leak(b) (3 rows) EXPLAIN (COSTS OFF) EXECUTE plancache_test2; @@ -2084,8 +2084,8 @@ EXPLAIN (COSTS OFF) EXECUTE plancache_test2; Nested Loop CTE q -> Seq Scan on z1 - Filter: f_leak(b) Remote Filter: ((a % 2) = 1) + Filter: f_leak(b) -> CTE Scan on q -> Materialize -> Seq Scan on z2 @@ -2100,8 +2100,8 @@ EXPLAIN (COSTS OFF) EXECUTE plancache_test3; -> CTE Scan on q -> Materialize -> Seq Scan on z1 - Filter: f_leak(b) Remote Filter: ((a % 2) = 1) + Filter: f_leak(b) (8 rows) -- @@ -2176,8 +2176,8 @@ EXPLAIN (COSTS OFF) SELECT * FROM rls_view; QUERY PLAN -------------------------------- Seq Scan on z1 - Filter: f_leak(b) Remote Filter: ((a % 2) = 0) + Filter: f_leak(b) (3 rows) -- Query as role that is not owner of table but is owner of view. @@ -2196,8 +2196,8 @@ EXPLAIN (COSTS OFF) SELECT * FROM rls_view; QUERY PLAN -------------------------------- Seq Scan on z1 - Filter: f_leak(b) Remote Filter: ((a % 2) = 0) + Filter: f_leak(b) (3 rows) -- Query as role that is not the owner of the table or view without permissions. @@ -2222,8 +2222,8 @@ EXPLAIN (COSTS OFF) SELECT * FROM rls_view; QUERY PLAN -------------------------------- Seq Scan on z1 - Filter: f_leak(b) Remote Filter: ((a % 2) = 0) + Filter: f_leak(b) (3 rows) SET SESSION AUTHORIZATION regress_rls_bob; @@ -2361,8 +2361,8 @@ EXPLAIN (COSTS OFF) SELECT * FROM rls_sbv WHERE (a = 1); QUERY PLAN -------------------------- Seq Scan on y1 - Filter: f_leak(b) Remote Filter: (a = 1) + Filter: f_leak(b) (3 rows) DROP VIEW rls_sbv; @@ -2374,8 +2374,8 @@ EXPLAIN (COSTS OFF) SELECT * FROM rls_sbv WHERE (a = 1); QUERY PLAN ----------------------------------------------------------- Seq Scan on y1 - Filter: f_leak(b) Remote Filter: ((a = 1) AND ((a > 2) OR ((a % 2) = 0))) + Filter: f_leak(b) (3 rows) DROP VIEW rls_sbv; @@ -2424,8 +2424,8 @@ EXPLAIN (COSTS OFF) SELECT * FROM y2 WHERE f_leak(b); QUERY PLAN -------------------------------------------------------------------- Seq Scan on y2 - Filter: f_leak(b) Remote Filter: (((a % 4) = 0) OR ((a % 3) = 0) OR ((a % 2) = 0)) + Filter: f_leak(b) (3 rows) -- @@ -2468,8 +2468,8 @@ EXPLAIN (COSTS OFF) SELECT * FROM y2 WHERE f_leak('abc'); QUERY PLAN -------------------------------------------------------------------- Seq Scan on y2 - Filter: f_leak('abc'::text) Remote Filter: (((a % 4) = 0) OR ((a % 3) = 0) OR ((a % 2) = 0)) + Filter: f_leak('abc'::text) (3 rows) CREATE TABLE test_qual_pushdown ( @@ -2525,8 +2525,8 @@ EXPLAIN (COSTS OFF) SELECT * FROM y2 JOIN test_qual_pushdown ON (b = abc) WHERE -> Sort Sort Key: y2.b -> Seq Scan on y2 - Filter: f_leak(b) Remote Filter: (((a % 4) = 0) OR ((a % 3) = 0) OR ((a % 2) = 0)) + Filter: f_leak(b) -> Sort Sort Key: test_qual_pushdown.abc -> Seq Scan on test_qual_pushdown @@ -2623,8 +2623,8 @@ EXPLAIN (COSTS OFF) WITH cte1 AS (SELECT * FROM t1 WHERE f_leak(b)) SELECT * FRO CTE Scan on cte1 CTE cte1 -> Seq Scan on t1 - Filter: f_leak(b) Remote Filter: ((a % 2) = 0) + Filter: f_leak(b) (5 rows) WITH cte1 AS (UPDATE t1 SET a = a + 1 RETURNING *) SELECT * FROM cte1; --fail diff --git a/src/postgres/src/test/regress/expected/yb_reindex.out b/src/postgres/src/test/regress/expected/yb_reindex.out index d32980cd93ca..e2a311507348 100644 --- a/src/postgres/src/test/regress/expected/yb_reindex.out +++ b/src/postgres/src/test/regress/expected/yb_reindex.out @@ -124,7 +124,7 @@ SELECT deptype FROM pg_depend WHERE classid = 'pg_class'::regclass and objid = 'yb'::regclass; QUERY PLAN ----------------------------------------------------------------------- - YB Seq Scan on pg_depend + Seq Scan on pg_depend Remote Filter: ((classid = '1259'::oid) AND (objid = '54321'::oid)) (2 rows) @@ -193,7 +193,7 @@ EXPLAIN (costs off) SELECT i FROM yb WHERE j = -5; QUERY PLAN -------------------------------------- - YB Seq Scan on yb + Seq Scan on yb Remote Filter: (j = '-5'::integer) (2 rows) @@ -392,7 +392,7 @@ SELECT deptype FROM pg_depend WHERE classid = 'pg_class'::regclass and objid = 'yb'::regclass; QUERY PLAN ----------------------------------------------------------------------- - YB Seq Scan on pg_depend + Seq Scan on pg_depend Remote Filter: ((classid = '1259'::oid) AND (objid = '54321'::oid)) (2 rows) @@ -427,7 +427,7 @@ EXPLAIN (costs off) SELECT i FROM yb WHERE j = -5; QUERY PLAN -------------------------------------- - YB Seq Scan on yb + Seq Scan on yb Remote Filter: (j = '-5'::integer) (2 rows) diff --git a/src/postgres/src/test/regress/expected/yb_select.out b/src/postgres/src/test/regress/expected/yb_select.out index 71f06bb5a546..9f6fc0228f41 100644 --- a/src/postgres/src/test/regress/expected/yb_select.out +++ b/src/postgres/src/test/regress/expected/yb_select.out @@ -566,7 +566,7 @@ explain (costs off) /*+ SeqScan(nr2) */ SELECT tableoid::regclass, * from nr2 where i = 1; QUERY PLAN -------------------------- - YB Seq Scan on nr2 + Seq Scan on nr2 Remote Filter: (i = 1) (2 rows) diff --git a/src/postgres/src/test/regress/expected/yb_system_targets.out b/src/postgres/src/test/regress/expected/yb_system_targets.out index ed9908de2d71..fb117d522120 100644 --- a/src/postgres/src/test/regress/expected/yb_system_targets.out +++ b/src/postgres/src/test/regress/expected/yb_system_targets.out @@ -5,9 +5,9 @@ INSERT INTO t_temp VALUES (1,1); -- check system columns in YbSeqScan (#18485) explain (costs off) /*+ SeqScan(t_normal) */ SELECT tableoid::regclass, * FROM t_normal; - QUERY PLAN -------------------------- - YB Seq Scan on t_normal + QUERY PLAN +---------------------- + Seq Scan on t_normal (1 row) /*+ SeqScan(t_normal) */ SELECT tableoid::regclass, * FROM t_normal; diff --git a/src/postgres/third-party-extensions/pg_hint_plan/expected/yb_pg_pg_hint_plan.out b/src/postgres/third-party-extensions/pg_hint_plan/expected/yb_pg_pg_hint_plan.out index f4e90f5bc66a..4cab322c6781 100644 --- a/src/postgres/third-party-extensions/pg_hint_plan/expected/yb_pg_pg_hint_plan.out +++ b/src/postgres/third-party-extensions/pg_hint_plan/expected/yb_pg_pg_hint_plan.out @@ -349,7 +349,7 @@ error hint: ------------------------------ Hash Join Hash Cond: (t1.id = t2.id) - -> YB Seq Scan on t1 + -> Seq Scan on t1 -> Hash -> Seq Scan on t2 (5 rows) @@ -367,7 +367,7 @@ error hint: QUERY PLAN -------------------------------------- Nested Loop - -> YB Seq Scan on t1 + -> Seq Scan on t1 -> Index Scan using t2_pkey on t2 Index Cond: (id = t1.id) (4 rows) @@ -386,7 +386,7 @@ error hint: QUERY PLAN -------------------------------------- Nested Loop - -> YB Seq Scan on t2 + -> Seq Scan on t2 -> Index Scan using t1_pkey on t1 Index Cond: (id = t2.id) (4 rows) @@ -404,7 +404,7 @@ error hint: QUERY PLAN -------------------------------------- Nested Loop - -> YB Seq Scan on t2 + -> Seq Scan on t2 -> Index Scan using t1_pkey on t1 Index Cond: (id = t2.id) (4 rows) @@ -422,7 +422,7 @@ error hint: ------------------------------ Hash Join Hash Cond: (t1.id = t2.id) - -> YB Seq Scan on t1 + -> Seq Scan on t1 -> Hash -> Seq Scan on t2 (5 rows) @@ -439,7 +439,7 @@ error hint: QUERY PLAN ----------------------------------- Nested Loop - -> YB Seq Scan on t1 + -> Seq Scan on t1 Remote Filter: (val < 10) -> Materialize -> Seq Scan on t4 @@ -996,7 +996,7 @@ error hint: Index Cond: (id = $1) InitPlan 1 (returns $0) -> Finalize Aggregate - -> YB Seq Scan on t1 v_1 + -> Seq Scan on t1 v_1 Remote Filter: (id < 10) Partial Aggregate: true InitPlan 2 (returns $1) @@ -1361,7 +1361,7 @@ error hint: Nested Loop -> Hash Join Hash Cond: ("""t1 ) ".id = "T3".id) - -> YB Seq Scan on t1 """t1 ) " + -> Seq Scan on t1 """t1 ) " -> Hash -> Seq Scan on t3 "T3" -> Index Scan using t2_pkey on t2 "t 2 """ @@ -1413,10 +1413,10 @@ error hint: Merge Cond: (t1.id = t2.id) -> Sort Sort Key: t1.id - -> YB Seq Scan on t1 + -> Seq Scan on t1 -> Sort Sort Key: t2.id - -> YB Seq Scan on t2 + -> Seq Scan on t2 (8 rows) -- sub query Leading hint test @@ -2239,15 +2239,15 @@ duplication hint: error hint: Set(123456789012345678901234567890123456789012345678901234567890123 1) - QUERY PLAN -------------------------------------------------------------------------------------------------------- + QUERY PLAN +---------------------------------------------------------------------------------------------------- Merge Join Merge Cond: ("123456789012345678901234567890123456789012345678901234567890123".id = t3.id) -> Merge Join Merge Cond: ("123456789012345678901234567890123456789012345678901234567890123".id = t2.id) -> Sort Sort Key: "123456789012345678901234567890123456789012345678901234567890123".id - -> YB Seq Scan on t1 "123456789012345678901234567890123456789012345678901234567890123" + -> Seq Scan on t1 "123456789012345678901234567890123456789012345678901234567890123" -> Sort Sort Key: t2.id -> Seq Scan on t2 @@ -2282,15 +2282,15 @@ duplication hint: error hint: Set(123456789012345678901234567890123456789012345678901234567890123 1) - QUERY PLAN -------------------------------------------------------------------------------------------------------- + QUERY PLAN +---------------------------------------------------------------------------------------------------- Merge Join Merge Cond: ("123456789012345678901234567890123456789012345678901234567890123".id = t3.id) -> Merge Join Merge Cond: ("123456789012345678901234567890123456789012345678901234567890123".id = t2.id) -> Sort Sort Key: "123456789012345678901234567890123456789012345678901234567890123".id - -> YB Seq Scan on t1 "123456789012345678901234567890123456789012345678901234567890123" + -> Seq Scan on t1 "123456789012345678901234567890123456789012345678901234567890123" -> Sort Sort Key: t2.id -> Seq Scan on t2 @@ -2363,7 +2363,7 @@ error hint: QUERY PLAN --------------------------- - YB Seq Scan on t5 + Seq Scan on t5 Remote Filter: (id = 1) (2 rows) @@ -2411,7 +2411,7 @@ error hint: QUERY PLAN --------------------------- - YB Seq Scan on t5 + Seq Scan on t5 Remote Filter: (id = 1) (2 rows) @@ -3487,7 +3487,7 @@ error hint: QUERY PLAN --------------------------- - YB Seq Scan on t5 + Seq Scan on t5 Remote Filter: (id = 1) (2 rows) @@ -3503,7 +3503,7 @@ error hint: QUERY PLAN --------------------------- - YB Seq Scan on t5 + Seq Scan on t5 Remote Filter: (id = 1) (2 rows) @@ -3519,7 +3519,7 @@ error hint: QUERY PLAN --------------------------- - YB Seq Scan on t5 + Seq Scan on t5 Remote Filter: (id = 1) (2 rows) @@ -3567,7 +3567,7 @@ error hint: QUERY PLAN --------------------------- - YB Seq Scan on t5 + Seq Scan on t5 Remote Filter: (id = 1) (2 rows) @@ -3583,7 +3583,7 @@ error hint: QUERY PLAN --------------------------- - YB Seq Scan on t5 + Seq Scan on t5 Remote Filter: (id = 1) (2 rows) @@ -3599,7 +3599,7 @@ error hint: QUERY PLAN --------------------------- - YB Seq Scan on t5 + Seq Scan on t5 Remote Filter: (id = 1) (2 rows) @@ -3631,7 +3631,7 @@ error hint: QUERY PLAN --------------------------- - YB Seq Scan on t5 + Seq Scan on t5 Remote Filter: (id = 1) (2 rows) @@ -3647,7 +3647,7 @@ error hint: QUERY PLAN --------------------------- - YB Seq Scan on t5 + Seq Scan on t5 Remote Filter: (id = 1) (2 rows) @@ -3663,7 +3663,7 @@ error hint: QUERY PLAN --------------------------- - YB Seq Scan on t5 + Seq Scan on t5 Remote Filter: (id = 1) (2 rows) @@ -3679,7 +3679,7 @@ error hint: QUERY PLAN --------------------------- - YB Seq Scan on t5 + Seq Scan on t5 Remote Filter: (id = 1) (2 rows) @@ -3740,7 +3740,7 @@ error hint: QUERY PLAN --------------------------- - YB Seq Scan on t1 + Seq Scan on t1 Remote Filter: (id = 1) (2 rows) @@ -4235,7 +4235,7 @@ error hint: Merge Cond: (t1.id = t2.id) -> Sort Sort Key: t1.id - -> YB Seq Scan on t1 + -> Seq Scan on t1 -> Sort Sort Key: t2.id -> Seq Scan on t2