sql/datasketches--1.5.0--1.6.0.sql [847:1041]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CREATE OR REPLACE FUNCTION aod_sketch_build_agg(internal, anyelement, double precision[]) RETURNS internal
    AS '$libdir/datasketches', 'pg_aod_sketch_build_agg'
    LANGUAGE C IMMUTABLE PARALLEL SAFE;

CREATE OR REPLACE FUNCTION aod_sketch_build_agg(internal, anyelement, double precision[], int) RETURNS internal
    AS '$libdir/datasketches', 'pg_aod_sketch_build_agg'
    LANGUAGE C IMMUTABLE PARALLEL SAFE;

CREATE OR REPLACE FUNCTION aod_sketch_build_agg(internal, anyelement, double precision[], int, real) RETURNS internal
    AS '$libdir/datasketches', 'pg_aod_sketch_build_agg'
    LANGUAGE C IMMUTABLE PARALLEL SAFE;

CREATE OR REPLACE FUNCTION aod_sketch_from_internal(internal) RETURNS aod_sketch
    AS '$libdir/datasketches', 'pg_aod_sketch_from_internal'
    LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE;

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

CREATE OR REPLACE FUNCTION aod_sketch_union_agg(internal, aod_sketch, int) RETURNS internal
    AS '$libdir/datasketches', 'pg_aod_sketch_union_agg'
    LANGUAGE C IMMUTABLE PARALLEL SAFE;

CREATE OR REPLACE FUNCTION aod_sketch_union_agg(internal, aod_sketch, int, int) RETURNS internal
    AS '$libdir/datasketches', 'pg_aod_sketch_union_agg'
    LANGUAGE C IMMUTABLE PARALLEL SAFE;

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

CREATE OR REPLACE FUNCTION aod_sketch_intersection_agg(internal, aod_sketch, int) RETURNS internal
    AS '$libdir/datasketches', 'pg_aod_sketch_intersection_agg'
    LANGUAGE C IMMUTABLE PARALLEL SAFE;    

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

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

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

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

CREATE OR REPLACE AGGREGATE aod_sketch_build(anyelement, double precision[]) (
    STYPE = internal,
    SFUNC = aod_sketch_build_agg,
    COMBINEFUNC = aod_sketch_union_combine,
    SERIALFUNC = aod_sketch_serialize_state,
    DESERIALFUNC = aod_sketch_deserialize_state, 
    FINALFUNC = aod_sketch_from_internal,
    PARALLEL = SAFE
);

CREATE OR REPLACE AGGREGATE aod_sketch_build(anyelement, double precision[], int) (
    STYPE = internal,
    SFUNC = aod_sketch_build_agg,
    COMBINEFUNC = aod_sketch_union_combine,
    SERIALFUNC = aod_sketch_serialize_state,
    DESERIALFUNC = aod_sketch_deserialize_state, 
    FINALFUNC = aod_sketch_from_internal,
    PARALLEL = SAFE
);

CREATE OR REPLACE AGGREGATE aod_sketch_build(anyelement, double precision[], int, real) (
    STYPE = internal,
    SFUNC = aod_sketch_build_agg,
    COMBINEFUNC = aod_sketch_union_combine,
    SERIALFUNC = aod_sketch_serialize_state,
    DESERIALFUNC = aod_sketch_deserialize_state, 
    FINALFUNC = aod_sketch_from_internal,
    PARALLEL = SAFE
);

CREATE OR REPLACE AGGREGATE aod_sketch_union(aod_sketch) (
    STYPE = internal,
    SFUNC = aod_sketch_union_agg,
    COMBINEFUNC = aod_sketch_union_combine,
    SERIALFUNC = aod_sketch_serialize_state,
    DESERIALFUNC = aod_sketch_deserialize_state, 
    FINALFUNC = aod_sketch_from_internal,
    PARALLEL = SAFE
);

CREATE OR REPLACE AGGREGATE aod_sketch_union(aod_sketch, int) (
    STYPE = internal,
    SFUNC = aod_sketch_union_agg,
    COMBINEFUNC = aod_sketch_union_combine,
    SERIALFUNC = aod_sketch_serialize_state,
    DESERIALFUNC = aod_sketch_deserialize_state, 
    FINALFUNC = aod_sketch_from_internal,
    PARALLEL = SAFE
);

CREATE OR REPLACE AGGREGATE aod_sketch_union(aod_sketch, int, int) (
    STYPE = internal,
    SFUNC = aod_sketch_union_agg,
    COMBINEFUNC = aod_sketch_union_combine,
    SERIALFUNC = aod_sketch_serialize_state,
    DESERIALFUNC = aod_sketch_deserialize_state, 
    FINALFUNC = aod_sketch_from_internal,
    PARALLEL = SAFE
);

CREATE OR REPLACE AGGREGATE aod_sketch_intersection(aod_sketch) (
    STYPE = internal,
    SFUNC = aod_sketch_intersection_agg,
    COMBINEFUNC = aod_sketch_intersection_combine,
    SERIALFUNC = aod_sketch_serialize_state,
    DESERIALFUNC = aod_sketch_deserialize_state, 
    FINALFUNC = aod_sketch_from_internal,
    PARALLEL = SAFE
);

CREATE OR REPLACE AGGREGATE aod_sketch_intersection(aod_sketch, int) (
    STYPE = internal,
    SFUNC = aod_sketch_intersection_agg,
    COMBINEFUNC = aod_sketch_intersection_combine,
    SERIALFUNC = aod_sketch_serialize_state,
    DESERIALFUNC = aod_sketch_deserialize_state, 
    FINALFUNC = aod_sketch_from_internal,
    PARALLEL = SAFE
);

CREATE OR REPLACE FUNCTION aod_sketch_get_estimate(aod_sketch) RETURNS double precision
    AS '$libdir/datasketches', 'pg_aod_sketch_get_estimate'
    LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE;

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

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

CREATE OR REPLACE FUNCTION aod_sketch_to_string(aod_sketch) RETURNS TEXT
    AS '$libdir/datasketches', 'pg_aod_sketch_to_string'
    LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE;

CREATE OR REPLACE FUNCTION aod_sketch_to_string(aod_sketch, boolean) RETURNS TEXT
    AS '$libdir/datasketches', 'pg_aod_sketch_to_string'
    LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE;

CREATE OR REPLACE FUNCTION aod_sketch_union(aod_sketch, aod_sketch) RETURNS aod_sketch
    AS '$libdir/datasketches', 'pg_aod_sketch_union'
    LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE;

CREATE OR REPLACE FUNCTION aod_sketch_union(aod_sketch, aod_sketch, int) RETURNS aod_sketch
    AS '$libdir/datasketches', 'pg_aod_sketch_union'
    LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE;

CREATE OR REPLACE FUNCTION aod_sketch_intersection(aod_sketch, aod_sketch) RETURNS aod_sketch
    AS '$libdir/datasketches', 'pg_aod_sketch_intersection'
    LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE;

CREATE OR REPLACE FUNCTION aod_sketch_intersection(aod_sketch, aod_sketch, int) RETURNS aod_sketch
    AS '$libdir/datasketches', 'pg_aod_sketch_intersection'
    LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE;

CREATE OR REPLACE FUNCTION aod_sketch_a_not_b(aod_sketch, aod_sketch) RETURNS aod_sketch
    AS '$libdir/datasketches', 'pg_aod_sketch_a_not_b'
    LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE;

CREATE OR REPLACE FUNCTION aod_sketch_a_not_b(aod_sketch, aod_sketch, int) RETURNS aod_sketch
    AS '$libdir/datasketches', 'pg_aod_sketch_a_not_b'
    LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE;

CREATE OR REPLACE FUNCTION aod_sketch_to_kll_float_sketch(aod_sketch, int) RETURNS kll_float_sketch
    AS '$libdir/datasketches', 'pg_aod_sketch_to_kll_float_sketch'
    LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE;

CREATE OR REPLACE FUNCTION aod_sketch_to_kll_float_sketch(aod_sketch, int, int) RETURNS kll_float_sketch
    AS '$libdir/datasketches', 'pg_aod_sketch_to_kll_float_sketch'
    LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE;

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

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

CREATE OR REPLACE FUNCTION aod_sketch_to_variances(aod_sketch) RETURNS double precision[]
    AS '$libdir/datasketches', 'pg_aod_sketch_to_variances'
    LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



