diff --git a/lints/0002_auth_users_exposed.sql b/lints/0002_auth_users_exposed.sql index b903e71..b14755a 100644 --- a/lints/0002_auth_users_exposed.sql +++ b/lints/0002_auth_users_exposed.sql @@ -29,6 +29,11 @@ from -- Depends on auth.users join pg_catalog.pg_depend d on d.refobjid = auth_users_pg_class.oid + -- Only match dependencies on the relation auth.users, not objects in + -- other catalogs (pg_proc, pg_type, ...) whose oid can numerically + -- collide with it. Mirrors the classid filter the other pg_depend + -- joins in this suite already use (see 0001, 0016, 0017). + and d.refclassid = 'pg_catalog.pg_class'::regclass join pg_catalog.pg_rewrite r on r.oid = d.objid join pg_catalog.pg_class c diff --git a/splinter.sql b/splinter.sql index 9cd66c9..c714cb7 100644 --- a/splinter.sql +++ b/splinter.sql @@ -129,6 +129,11 @@ from -- Depends on auth.users join pg_catalog.pg_depend d on d.refobjid = auth_users_pg_class.oid + -- Only match dependencies on the relation auth.users, not objects in + -- other catalogs (pg_proc, pg_type, ...) whose oid can numerically + -- collide with it. Mirrors the classid filter the other pg_depend + -- joins in this suite already use (see 0001, 0016, 0017). + and d.refclassid = 'pg_catalog.pg_class'::regclass join pg_catalog.pg_rewrite r on r.oid = d.objid join pg_catalog.pg_class c