     END LOOP;
     IF last_event IS NOT NULL THEN
         tmp := 'INSERT INTO ' || table_name || ' (' || insert_col_clause || ') VALUES (' || values_clause || ')';
-        RAISE NOTICE 'Running %', tmp;
+        RAISE DEBUG 'Running %', tmp;
         EXECUTE tmp;
     END IF;
 END;

END;
$$;


CREATE FUNCTION create_single_form_table(form_name text, table_count integer, colnames_clause text, cols_plus_vals_clause text) RETURNS void
    LANGUAGE plpgsql
    AS $$

    tmp                   TEXT;
    table_name            TEXT;
BEGIN
    FOR form_name IN SELECT DISTINCT short_name FROM forms WHERE short_name IS NOT NULL AND short_name != '' ORDER BY short_name LOOP
        -- For each form, find all the question short names that appear on it
        RAISE DEBUG 'Processing form name %', form_name;
        i := 0;
        colnames_clause := '';
        cols_plus_vals_clause := '';
