sql/datasketches--1.3.0--1.6.0.sql [26:144]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CREATE OR REPLACE FUNCTION cpc_sketch_build_agg(internal, anyelement) RETURNS internal
    AS '$libdir/datasketches', 'pg_cpc_sketch_build_agg'
    LANGUAGE C IMMUTABLE PARALLEL SAFE;

CREATE OR REPLACE FUNCTION cpc_sketch_build_agg(internal, anyelement, int) RETURNS internal
    AS '$libdir/datasketches', 'pg_cpc_sketch_build_agg'
    LANGUAGE C IMMUTABLE PARALLEL SAFE;

CREATE OR REPLACE FUNCTION cpc_sketch_from_internal(internal) RETURNS cpc_sketch
    AS '$libdir/datasketches', 'pg_cpc_sketch_from_internal'
    LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE;

CREATE OR REPLACE FUNCTION cpc_sketch_get_estimate_from_internal(internal) RETURNS double precision
    AS '$libdir/datasketches', 'pg_cpc_sketch_get_estimate_from_internal'
    LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE;

CREATE OR REPLACE FUNCTION cpc_sketch_union_agg(internal, cpc_sketch) RETURNS internal
    AS '$libdir/datasketches', 'pg_cpc_sketch_union_agg'
    LANGUAGE C IMMUTABLE PARALLEL SAFE;

CREATE OR REPLACE FUNCTION cpc_sketch_union_agg(internal, cpc_sketch, int) RETURNS internal
    AS '$libdir/datasketches', 'pg_cpc_sketch_union_agg'
    LANGUAGE C IMMUTABLE PARALLEL SAFE;

CREATE OR REPLACE FUNCTION cpc_sketch_combine(internal, internal) RETURNS internal
    AS '$libdir/datasketches', 'pg_cpc_sketch_combine'
    LANGUAGE C IMMUTABLE PARALLEL SAFE;

CREATE OR REPLACE FUNCTION cpc_sketch_serialize_state(internal) RETURNS bytea
    AS '$libdir/datasketches', 'pg_cpc_sketch_serialize_state'
    LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE;

CREATE OR REPLACE FUNCTION cpc_sketch_deserialize_state(bytea, internal) RETURNS internal
    AS '$libdir/datasketches', 'pg_cpc_sketch_deserialize_state'
    LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE;

CREATE OR REPLACE AGGREGATE cpc_sketch_distinct(anyelement) (
    STYPE = internal,
    SFUNC = cpc_sketch_build_agg,
    COMBINEFUNC = cpc_sketch_combine,
    SERIALFUNC = cpc_sketch_serialize_state,
    DESERIALFUNC = cpc_sketch_deserialize_state, 
    FINALFUNC = cpc_sketch_get_estimate_from_internal,
    PARALLEL = SAFE
);

CREATE OR REPLACE AGGREGATE cpc_sketch_distinct(anyelement, int) (
    STYPE = internal,
    SFUNC = cpc_sketch_build_agg,
    COMBINEFUNC = cpc_sketch_combine,
    SERIALFUNC = cpc_sketch_serialize_state,
    DESERIALFUNC = cpc_sketch_deserialize_state, 
    FINALFUNC = cpc_sketch_get_estimate_from_internal,
    PARALLEL = SAFE
);

CREATE OR REPLACE AGGREGATE cpc_sketch_build(anyelement) (
    STYPE = internal,
    SFUNC = cpc_sketch_build_agg,
    COMBINEFUNC = cpc_sketch_combine,
    SERIALFUNC = cpc_sketch_serialize_state,
    DESERIALFUNC = cpc_sketch_deserialize_state, 
    FINALFUNC = cpc_sketch_from_internal,
    PARALLEL = SAFE
);

CREATE OR REPLACE AGGREGATE cpc_sketch_build(anyelement, int) (
    STYPE = internal,
    SFUNC = cpc_sketch_build_agg,
    COMBINEFUNC = cpc_sketch_combine,
    SERIALFUNC = cpc_sketch_serialize_state,
    DESERIALFUNC = cpc_sketch_deserialize_state, 
    FINALFUNC = cpc_sketch_from_internal,
    PARALLEL = SAFE
);

CREATE OR REPLACE AGGREGATE cpc_sketch_union(cpc_sketch) (
    STYPE = internal,
    SFUNC = cpc_sketch_union_agg,
    COMBINEFUNC = cpc_sketch_combine,
    SERIALFUNC = cpc_sketch_serialize_state,
    DESERIALFUNC = cpc_sketch_deserialize_state, 
    FINALFUNC = cpc_sketch_from_internal,
    PARALLEL = SAFE
);

CREATE OR REPLACE AGGREGATE cpc_sketch_union(cpc_sketch, int) (
    STYPE = internal,
    SFUNC = cpc_sketch_union_agg,
    COMBINEFUNC = cpc_sketch_combine,
    SERIALFUNC = cpc_sketch_serialize_state,
    DESERIALFUNC = cpc_sketch_deserialize_state, 
    FINALFUNC = cpc_sketch_from_internal,
    PARALLEL = SAFE
);

CREATE OR REPLACE FUNCTION cpc_sketch_get_estimate(cpc_sketch) RETURNS double precision
    AS '$libdir/datasketches', 'pg_cpc_sketch_get_estimate'
    LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE;

CREATE OR REPLACE FUNCTION cpc_sketch_get_estimate_and_bounds(cpc_sketch) RETURNS double precision[]
    AS '$libdir/datasketches', 'pg_cpc_sketch_get_estimate_and_bounds'
    LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE;

CREATE OR REPLACE FUNCTION cpc_sketch_get_estimate_and_bounds(cpc_sketch, int) RETURNS double precision[]
    AS '$libdir/datasketches', 'pg_cpc_sketch_get_estimate_and_bounds'
    LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE;

CREATE OR REPLACE FUNCTION cpc_sketch_to_string(cpc_sketch) RETURNS TEXT
    AS '$libdir/datasketches', 'pg_cpc_sketch_to_string'
    LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE;

CREATE OR REPLACE FUNCTION cpc_sketch_union(cpc_sketch, cpc_sketch) RETURNS cpc_sketch
    AS '$libdir/datasketches', 'pg_cpc_sketch_union'
    LANGUAGE C IMMUTABLE PARALLEL SAFE;

CREATE OR REPLACE FUNCTION cpc_sketch_union(cpc_sketch, cpc_sketch, int) RETURNS cpc_sketch
    AS '$libdir/datasketches', 'pg_cpc_sketch_union'
    LANGUAGE C IMMUTABLE PARALLEL SAFE;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



