Skip to content

find tables in: select ... into t1 from t2 #8

@goranschwarz

Description

@goranschwarz

Hi there!

I have a Postgres function that looks like

CREATE OR REPLACE FUNCTION t1_dummy2_func() RETURNS integer AS $$
DECLARE
  v_rowcount int;
BEGIN
   FOR i IN 1..10 LOOP
      select count(*) INTO v_rowcount
      from t1 
      where c2 = cast(gen_random_uuid() as varchar(30));
   END LOOP;

   return v_rowcount;
END;
$$ LANGUAGE plpgsql;

Don't think abut what the function does, it's just a dummy implementation

When I parse that for tables, I get: v_rowcount
But I expect the following result: v_rowcount and t1

Ok v_rowcount is really a variable... but it's OK to get some extra information.
But I am missing the table t1 totally

Can this be fixed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions