forked from timescale/timescaledb
/
compression_with_clause.h
42 lines (36 loc) · 1.21 KB
/
compression_with_clause.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
* This file and its contents are licensed under the Apache License 2.0.
* Please see the included NOTICE for copyright information and
* LICENSE-APACHE for a copy of the license.
*/
#ifndef TIMESCALEDB_COMPRESSION_WITH_CLAUSE_H
#define TIMESCALEDB_COMPRESSION_WITH_CLAUSE_H
#include <postgres.h>
#include <catalog/pg_type.h>
#include "ts_catalog/catalog.h"
#include "chunk.h"
#include "with_clause_parser.h"
typedef enum CompressHypertableOption
{
CompressEnabled = 0,
CompressSegmentBy,
CompressOrderBy,
CompressChunkTimeInterval,
CompressOptionMax
} CompressHypertableOption;
typedef struct
{
short index;
NameData colname;
bool nullsfirst;
bool asc;
} CompressedParsedCol;
extern TSDLLEXPORT WithClauseResult *ts_compress_hypertable_set_clause_parse(const List *defelems);
extern TSDLLEXPORT List *ts_compress_hypertable_parse_segment_by(WithClauseResult *parsed_options,
Hypertable *hypertable);
extern TSDLLEXPORT List *ts_compress_hypertable_parse_order_by(WithClauseResult *parsed_options,
Hypertable *hypertable);
extern TSDLLEXPORT Interval *
ts_compress_hypertable_parse_chunk_time_interval(WithClauseResult *parsed_options,
Hypertable *hypertable);
#endif