pg_partman v4 vs pg_partman v5 

Une fonction diffère. 

Conséquence la version 5 va gérer nativement la rotation des partitions et pas la 4 

voici la fonction : 



create function check_partition_type(p_type text) returns boolean
    immutable
    security definer
    SET search_path = pg_catalog, pg_temp
    language plpgsql
as
$$
DECLARE
v_result    boolean;
BEGIN
    SELECT p_type IN ('partman', 'time-custom', 'native') INTO v_result;
    RETURN v_result;
END
$$;

alter function check_partition_type(text) owner to postgres;

grant execute on function check_partition_type(text) to <role>;

[Postgres] Extensions
[Postgres] Identifier les attentes

Leave a Comment

Your email address will not be published. Required fields are marked *