Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions contrib/babelfishpg_tsql/src/hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
#include "access/genam.h"
#include "access/heapam.h"
#include "access/htup.h"
#include "access/relation.h"
#include "access/reloptions.h"
#include "access/stratnum.h"
#include "access/table.h"
#include "access/transam.h"
#include "catalog/heap.h"
#include "utils/pg_locale.h"
#include "access/xact.h"
#include "access/relation.h"
#include "access/reloptions.h"
#include "catalog/catalog.h"
#include "catalog/dependency.h"
#include "catalog/heap.h"
#include "catalog/namespace.h"
#include "catalog/objectaccess.h"
#include "catalog/pg_aggregate.h"
Expand All @@ -25,16 +25,16 @@
#include "catalog/pg_db_role_setting.h"
#include "catalog/pg_depend.h" /* Required in handle_bbf_view_binding_on_object_drop to access pg_rewrite dependencies */
#include "catalog/pg_namespace.h"
#include "catalog/pg_operator.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_rewrite.h"
#include "catalog/pg_sequence.h"
#include "catalog/pg_tablespace.h"
#include "catalog/pg_trigger.h"
#include "catalog/pg_trigger_d.h"
#include "catalog/pg_type.h"
#include "catalog/pg_rewrite.h"
#include "catalog/pg_operator.h"
#include "catalog/pg_tablespace.h"
#include "catalog/pg_sequence.h"
#include "commands/copy.h"
#include "commands/comment.h"
#include "commands/copy.h"
#include "commands/dbcommands.h"
#include "commands/explain.h"
#include "commands/extension.h"
Expand All @@ -44,6 +44,7 @@
#include "commands/view.h"
#include "common/logging.h"
#include "executor/execExpr.h"
#include "executor/nodeFunctionscan.h"
#include "executor/spi.h"
#include "executor/spi_priv.h"
#include "funcapi.h"
Expand All @@ -56,18 +57,17 @@
#include "optimizer/paths.h"
#include "optimizer/planner.h"
#include "optimizer/restrictinfo.h"
#include "access/stratnum.h"
#include "parser/analyze.h"
#include "parser/parse_clause.h"
#include "parser/parse_coerce.h"
#include "parser/parse_expr.h"
#include "parser/parse_func.h"
#include "parser/parse_oper.h"
#include "parser/parse_param.h"
#include "parser/parse_relation.h"
#include "parser/parse_utilcmd.h"
#include "parser/parse_target.h"
#include "parser/parse_type.h"
#include "parser/parse_oper.h"
#include "parser/parse_utilcmd.h"
#include "parser/parser.h"
#include "parser/scanner.h"
#include "parser/scansup.h"
Expand All @@ -81,16 +81,17 @@
#include "utils/fmgroids.h"
#include "utils/inval.h"
#include "utils/lsyscache.h"
#include "utils/numeric.h"
#include "utils/pg_locale.h"
#include "utils/queryenvironment.h"
#include "utils/rel.h"
#include "utils/relcache.h"
#include "utils/ruleutils.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"
#include "utils/numeric.h"
#include "utils/queryenvironment.h"
#include "utils/xml.h"
#include <math.h>
#include "pgstat.h"
#include "executor/nodeFunctionscan.h"
#include "backend_parser/scanner.h"
#include "hooks.h"
#include "pltsql.h"
Expand All @@ -107,7 +108,6 @@
#include "table_variable_mvcc.h"
#include "bbf_parallel_query.h"
#include "extendedproperty.h"
#include "utils/xml.h"

#ifdef USE_LIBXML
#include <libxml/tree.h>
Expand Down
25 changes: 25 additions & 0 deletions test/JDBC/expected/BABEL-6814-vu-verify.out
Original file line number Diff line number Diff line change
Expand Up @@ -277,5 +277,30 @@ Index Scan using pg_class_oid_index on pg_class
~~END~~


-- Test 23: EXPLAIN volatile function with seqscan disabled
SELECT set_config('enable_seqscan', 'off', false);
GO
~~START~~
text
off
~~END~~

EXPLAIN (COSTS OFF) SELECT * FROM pg_class WHERE (oid)::int4 = random()::int;
GO
~~START~~
text
Seq Scan on pg_class
Disabled: true
Filter: ((oid)::integer = (random())::integer)
~~END~~

SELECT set_config('enable_seqscan', 'on', false);
GO
~~START~~
text
on
~~END~~


RESET babelfishpg_tsql.sql_dialect;
GO
25 changes: 25 additions & 0 deletions test/JDBC/expected/parallel_query/BABEL-6814-vu-verify.out
Original file line number Diff line number Diff line change
Expand Up @@ -294,5 +294,30 @@ Gather
~~END~~


-- Test 23: EXPLAIN volatile function with seqscan disabled
SELECT set_config('enable_seqscan', 'off', false);
GO
~~START~~
text
off
~~END~~

EXPLAIN (COSTS OFF) SELECT * FROM pg_class WHERE (oid)::int4 = random()::int;
GO
~~START~~
text
Seq Scan on pg_class
Disabled: true
Filter: ((oid)::integer = (random())::integer)
~~END~~

SELECT set_config('enable_seqscan', 'on', false);
GO
~~START~~
text
on
~~END~~


RESET babelfishpg_tsql.sql_dialect;
GO
8 changes: 8 additions & 0 deletions test/JDBC/input/BABEL-6814-vu-verify.mix
Original file line number Diff line number Diff line change
Expand Up @@ -139,5 +139,13 @@ GO
EXPLAIN (COSTS OFF) SELECT * FROM pg_class WHERE (oid)::int4 = 99999999;
GO

-- Test 23: EXPLAIN volatile function with seqscan disabled
SELECT set_config('enable_seqscan', 'off', false);
GO
EXPLAIN (COSTS OFF) SELECT * FROM pg_class WHERE (oid)::int4 = random()::int;
GO
SELECT set_config('enable_seqscan', 'on', false);
GO

RESET babelfishpg_tsql.sql_dialect;
GO
Loading