Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE OR REPLACE FUNCTION get_all_ancestors()
- RETURNS TABLE (
- c_id BIGINT,
- p_id BIGINT,
- p_type VARCHAR,
- pd_type VARCHAR,
- d_type VARCHAR,
- d_value VARCHAR
- ) AS
- $BODY$
- DECLARE
- r product_partition%ROWTYPE;
- BEGIN
- FOR r IN
- SELECT * FROM product_partition WHERE partition_type = 'Unit'
- LOOP
- RETURN NEXT
- SELECT * product_partition_ancestors_fn(r.criterion_id, r.adgroup_id);
- END LOOP;
- RETURN;
- END
- $BODY$
- LANGUAGE plpgsql;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement