Skip to content

add_compression_policy migration helper raises a syntax error #121

@AaronCDee

Description

@AaronCDee

Hi there,

There is a syntax error in the add_compression_policy migration helper when including thecompression_chunk_time_interval argument.

The issue is that it uses the following syntax:

"timescaledb.compression_chunk_time_interval = INTERVAL '#{compression_chunk_time_interval}'"

The TigerData docs specify that there should be no INTERVAL keyword used and should just be set to the given interval eg:

ALTER TABLE <table_name> SET (
   timescaledb.compress,
   timescaledb.compress_orderby = '<column_name> [ASC | DESC] [ NULLS { FIRST | LAST } ] [, ...]',
   timescaledb.compress_segmentby = '<column_name> [, ...]',
   timescaledb.compress_chunk_time_interval='interval' # No INTERVAL key word used here
);

I can open a PR to fix this error, as we needed this and weren't able to use it because of the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions