imcs.c
/* Checks if columnar store was initialized and mark it as initialized */
Checks if columnar store was initialized and mark it as initialized
Checks if columnar store was initialized and mark it as initialized
Datum columnar_store_initialized(PG_FUNCTION_ARGS)
{
    char const* table_name = PG_GETARG_CSTRING(0);
    bool initialize = PG_GETARG_BOOL(1);
    imcs_timeseries_t* ts = imcs_get_timeseries(table_name, TID_int8, false, 0, initialize);
    bool is_initialized = ts != NULL && ts->count != 0;
    if (initialize) {
        ts->count = 1;
    }
    PG_RETURN_BOOL(is_initialized);
}
Datum columnar_store_initialized ( PG_FUNCTION_ARGS ) { char const * table_name = PG_GETARG_CSTRING ( 0 ) ; bool initialize = PG_GETARG_BOOL ( 1 ) ; imcs_timeseries_t * ts = imcs_get_timeseries ( table_name , TID_int8 , false , 0 , initialize ) ; bool is_initialized = ts != NULL && ts -> count != 0 ; if ( initialize ) { ts -> count = 1 ; } PG_RETURN_BOOL ( is_initialized ) ; }
Checks if columnar store was initialized and mark it as initialized
Checks if columnar store was initialized and mark it as initialized