-- -- Test the CREATE statements related to cstore_fdw. -- -- Install cstore_fdw CREATE EXTENSION cstore_fdw; CREATE SERVER cstore_server FOREIGN DATA WRAPPER cstore_fdw; -- Validator tests CREATE FOREIGN TABLE test_validator_invalid_option () SERVER cstore_server OPTIONS(filename 'data.cstore', bad_option_name '1'); -- ERROR ERROR: invalid option "bad_option_name" HINT: Valid options in this context are: filename, compression, stripe_row_count, block_row_count CREATE FOREIGN TABLE test_validator_filename_missing () SERVER cstore_server; -- ERROR ERROR: filename is required for cstore foreign tables CREATE FOREIGN TABLE test_validator_invalid_stripe_row_count () SERVER cstore_server OPTIONS(filename 'data.cstore', stripe_row_count '0'); -- ERROR ERROR: invalid stripe row count HINT: Stripe row count must be an integer between 1000 and 10000000 CREATE FOREIGN TABLE test_validator_invalid_block_row_count () SERVER cstore_server OPTIONS(filename 'data.cstore', block_row_count '0'); -- ERROR ERROR: invalid block row count HINT: Block row count must be an integer between 1000 and 100000 CREATE FOREIGN TABLE test_validator_invalid_compression_type () SERVER cstore_server OPTIONS(filename 'data.cstore', compression 'invalid_compression'); -- ERROR ERROR: invalid compression type HINT: Valid options are: none, pglz -- Create uncompressed table CREATE FOREIGN TABLE contestant (handle TEXT, birthdate DATE, rating INT, percentile FLOAT, country CHAR(3), achievements TEXT[]) SERVER cstore_server OPTIONS(filename '@abs_srcdir@/data/contestant.cstore'); -- Create compressed table CREATE FOREIGN TABLE contestant_compressed (handle TEXT, birthdate DATE, rating INT, percentile FLOAT, country CHAR(3), achievements TEXT[]) SERVER cstore_server OPTIONS(filename '@abs_srcdir@/data/contestant_compressed.cstore', compression 'pglz');