fix columnar tests

merge-cstore-pykello
Nils Dijk 2020-11-06 17:27:23 +01:00
parent 6747dd1822
commit 94c24566bf
No known key found for this signature in database
GPG Key ID: CA1177EF9434F241
7 changed files with 34 additions and 12 deletions

View File

@ -37,14 +37,17 @@ SELECT :cstore_data_files_before_drop - count(*) FROM cstore.cstore_data_files;
SELECT current_database() datname \gset
CREATE DATABASE db_to_drop;
NOTICE: Citus partially supports CREATE DATABASE for distributed databases
DETAIL: Citus does not propagate CREATE DATABASE command to workers
HINT: You can manually create a database and its extensions on workers.
\c db_to_drop
CREATE EXTENSION cstore_fdw;
CREATE EXTENSION citus;
SELECT oid::text databaseoid FROM pg_database WHERE datname = current_database() \gset
CREATE TABLE test_table(data int) USING cstore_tableam;
DROP EXTENSION cstore_fdw CASCADE;
DROP EXTENSION citus CASCADE;
NOTICE: drop cascades to table test_table
-- test database drop
CREATE EXTENSION cstore_fdw;
CREATE EXTENSION citus;
SELECT oid::text databaseoid FROM pg_database WHERE datname = current_database() \gset
CREATE TABLE test_table(data int) USING cstore_tableam;
\c :datname

View File

@ -50,16 +50,28 @@ ERROR: AFTER ROW triggers are not supported for columnstore access method
HINT: Consider an AFTER STATEMENT trigger instead.
insert into test_tr values(1);
NOTICE: BEFORE STATEMENT INSERT
CONTEXT: PL/pgSQL function trs_before() line 3 at RAISE
NOTICE: BEFORE ROW INSERT: (1)
CONTEXT: PL/pgSQL function trr_before() line 3 at RAISE
NOTICE: AFTER STATEMENT INSERT
CONTEXT: PL/pgSQL function trs_after() line 5 at RAISE
NOTICE: (1)
CONTEXT: PL/pgSQL function trs_after() line 14 at RAISE
insert into test_tr values(2),(3),(4);
NOTICE: BEFORE STATEMENT INSERT
CONTEXT: PL/pgSQL function trs_before() line 3 at RAISE
NOTICE: BEFORE ROW INSERT: (2)
CONTEXT: PL/pgSQL function trr_before() line 3 at RAISE
NOTICE: BEFORE ROW INSERT: (3)
CONTEXT: PL/pgSQL function trr_before() line 3 at RAISE
NOTICE: BEFORE ROW INSERT: (4)
CONTEXT: PL/pgSQL function trr_before() line 3 at RAISE
NOTICE: AFTER STATEMENT INSERT
CONTEXT: PL/pgSQL function trs_after() line 5 at RAISE
NOTICE: (2)
CONTEXT: PL/pgSQL function trs_after() line 14 at RAISE
NOTICE: (3)
CONTEXT: PL/pgSQL function trs_after() line 14 at RAISE
NOTICE: (4)
CONTEXT: PL/pgSQL function trs_after() line 14 at RAISE
drop table test_tr;

View File

@ -226,6 +226,8 @@ INSERT INTO truncate_schema.truncate_tbl SELECT generate_series(1, 100);
set cstore.compression to default;
-- create a user that can not truncate
CREATE USER truncate_user;
NOTICE: not propagating CREATE ROLE/USER commands to worker nodes
HINT: Connect to worker nodes directly to manually create all necessary users and roles.
GRANT USAGE ON SCHEMA truncate_schema TO truncate_user;
GRANT SELECT ON TABLE truncate_schema.truncate_tbl TO truncate_user;
REVOKE TRUNCATE ON TABLE truncate_schema.truncate_tbl FROM truncate_user;

View File

@ -37,17 +37,20 @@ SELECT :cstore_data_files_before_drop - count(*) FROM cstore.cstore_data_files;
SELECT current_database() datname \gset
CREATE DATABASE db_to_drop;
NOTICE: Citus partially supports CREATE DATABASE for distributed databases
DETAIL: Citus does not propagate CREATE DATABASE command to workers
HINT: You can manually create a database and its extensions on workers.
\c db_to_drop
CREATE EXTENSION cstore_fdw;
CREATE EXTENSION citus;
CREATE SERVER cstore_server FOREIGN DATA WRAPPER cstore_fdw;
SELECT oid::text databaseoid FROM pg_database WHERE datname = current_database() \gset
CREATE FOREIGN TABLE test_table(data int) SERVER cstore_server;
DROP EXTENSION cstore_fdw CASCADE;
DROP EXTENSION citus CASCADE;
NOTICE: drop cascades to 2 other objects
DETAIL: drop cascades to server cstore_server
drop cascades to foreign table test_table
-- test database drop
CREATE EXTENSION cstore_fdw;
CREATE EXTENSION citus;
CREATE SERVER cstore_server FOREIGN DATA WRAPPER cstore_fdw;
SELECT oid::text databaseoid FROM pg_database WHERE datname = current_database() \gset
CREATE FOREIGN TABLE test_table(data int) SERVER cstore_server;

View File

@ -218,6 +218,8 @@ SELECT COUNT(*) FROM truncate_schema.truncate_tbl;
INSERT INTO truncate_schema.truncate_tbl SELECT generate_series(1, 100);
-- create a user that can not truncate
CREATE USER truncate_user;
NOTICE: not propagating CREATE ROLE/USER commands to worker nodes
HINT: Connect to worker nodes directly to manually create all necessary users and roles.
GRANT USAGE ON SCHEMA truncate_schema TO truncate_user;
GRANT SELECT ON TABLE truncate_schema.truncate_tbl TO truncate_user;
REVOKE TRUNCATE ON TABLE truncate_schema.truncate_tbl FROM truncate_user;

View File

@ -36,15 +36,15 @@ SELECT current_database() datname \gset
CREATE DATABASE db_to_drop;
\c db_to_drop
CREATE EXTENSION cstore_fdw;
CREATE EXTENSION citus;
SELECT oid::text databaseoid FROM pg_database WHERE datname = current_database() \gset
CREATE TABLE test_table(data int) USING cstore_tableam;
DROP EXTENSION cstore_fdw CASCADE;
DROP EXTENSION citus CASCADE;
-- test database drop
CREATE EXTENSION cstore_fdw;
CREATE EXTENSION citus;
SELECT oid::text databaseoid FROM pg_database WHERE datname = current_database() \gset
CREATE TABLE test_table(data int) USING cstore_tableam;

View File

@ -36,16 +36,16 @@ SELECT current_database() datname \gset
CREATE DATABASE db_to_drop;
\c db_to_drop
CREATE EXTENSION cstore_fdw;
CREATE EXTENSION citus;
CREATE SERVER cstore_server FOREIGN DATA WRAPPER cstore_fdw;
SELECT oid::text databaseoid FROM pg_database WHERE datname = current_database() \gset
CREATE FOREIGN TABLE test_table(data int) SERVER cstore_server;
DROP EXTENSION cstore_fdw CASCADE;
DROP EXTENSION citus CASCADE;
-- test database drop
CREATE EXTENSION cstore_fdw;
CREATE EXTENSION citus;
CREATE SERVER cstore_server FOREIGN DATA WRAPPER cstore_fdw;
SELECT oid::text databaseoid FROM pg_database WHERE datname = current_database() \gset