OBJS = online_analyze.o
#DATA_built = online_analyze.sql
DOCS = README.online_analyze
-#REGRESS = online_analyze
+REGRESS = online_analyze
ifdef USE_PGXS
PGXS := $(shell pg_config --pgxs)
--- /dev/null
+LOAD 'online_analyze';
+SET online_analyze.enable = on;
+SET "online_analyze.verbose" = on;
+SET online_analyze.table_type = "all";
+SHOW online_analyze.enable;
+ online_analyze.enable
+-----------------------
+ on
+(1 row)
+
+SHOW "online_analyze.verbose";
+ online_analyze.verbose
+------------------------
+ on
+(1 row)
+
+SHOW online_analyze.table_type;
+ online_analyze.table_type
+---------------------------
+ all
+(1 row)
+
+CREATE TABLE oa_tbl(
+ foo int,
+ bar text
+);
+SHOW online_analyze.exclude_tables;
+ online_analyze.exclude_tables
+-------------------------------
+
+(1 row)
+
+SET online_analyze.exclude_tables = "oa_tbl";
+SHOW online_analyze.exclude_tables;
+ online_analyze.exclude_tables
+-------------------------------
+ public.oa_tbl
+(1 row)
+
+DROP TABLE oa_tbl;
+SHOW online_analyze.exclude_tables;
+ online_analyze.exclude_tables
+-------------------------------
+
+(1 row)
+
+SET online_analyze.enable = off;
--- /dev/null
+# Copyright (c) 2023, Postgres Professional
+
+online_analyze_sources = files(
+ 'online_analyze.c'
+)
+
+if host_system == 'windows'
+ online_analyze_sources += rc_lib_gen.process(win32ver_rc, extra_args: [
+ '--NAME', 'online_analyze',
+ '--FILEDESC', 'online_analyze - provides a set of features that immediately update statistics after INSERT, UPDATE, DELETE, or SELECT INTO operations for the affected tables.',])
+endif
+
+online_analyze = shared_module('online_analyze',
+ online_analyze_sources,
+ kwargs: contrib_mod_args,
+)
+contrib_targets += online_analyze
+
+tests += {
+ 'name': 'online_analyze',
+ 'sd': meson.current_source_dir(),
+ 'bd': meson.current_build_dir(),
+ 'regress': {
+ 'sql': [
+ 'online_analyze',
+ ],
+ },
+}
--- /dev/null
+LOAD 'online_analyze';
+
+SET online_analyze.enable = on;
+SET "online_analyze.verbose" = on;
+SET online_analyze.table_type = "all";
+
+SHOW online_analyze.enable;
+SHOW "online_analyze.verbose";
+SHOW online_analyze.table_type;
+
+CREATE TABLE oa_tbl(
+ foo int,
+ bar text
+);
+SHOW online_analyze.exclude_tables;
+SET online_analyze.exclude_tables = "oa_tbl";
+SHOW online_analyze.exclude_tables;
+DROP TABLE oa_tbl;
+SHOW online_analyze.exclude_tables;
+
+SET online_analyze.enable = off;