Skip to content

Make tracking of object creation and search_path optional #45

@svenklemm

Description

@svenklemm

Since we don't do control flow analysis our object creation tracking can mask potential problems and produce false negatives. The following snippet would not produce a warning about unsafe function creation even though it should since the first CREATE FUNCTION would never execute making the 2nd CREATE OR REPLACE unsafe.

DO $$
BEGIN
  IF false THEN
     CREATE FUNCTION f1() RETURNS int LANGUAGE SQL AS $w2$ SELECT 1; $w2$;
  END IF;
END; $$;
CREATE OR REPLACE FUNCTION f1() RETURNS int LANGUAGE SQL AS $$ SELECT 1; $$;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions