Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Repro steps for citusdata/citus#2009
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();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.