CREATE TABLE dist (id integer);
CREATE TABLE ref  (id integer);

SELECT create_distributed_table('dist', 'id');
SELECT create_reference_table('ref');

CREATE FUNCTION dist_func()
RETURNS void LANGUAGE plpgsql AS $$
BEGIN
    EXECUTE 'SELECT id, $1 FROM dist' USING 1;
END; $$;

CREATE FUNCTION ref_func()
RETURNS void LANGUAGE plpgsql AS $$
BEGIN
    EXECUTE 'SELECT id, $1 FROM ref' USING 1;
END; $$;

SELECT dist_func();
SELECT  ref_func();

SET auto_explain.log_min_duration      TO 0;
SET auto_explain.log_nested_statements TO on;

SELECT dist_func();
SELECT  ref_func();
