ora2pg
ora2pg copied to clipboard
Invalid Functions counts for -t TEST , due to missing schema filter.
While performing TEST operation, on Function count we are not filtering migration schema or schema from config PG_SCHEMA in Metadata query. currently it is considering all schema in the database, if it can be filtered based on schema reporting will look appropriate.
my $schema_clause = " AND n.nspname NOT IN ('pg_catalog','information_schema')";
$sql = qq{
SELECT n.nspname,proname,prorettype
FROM pg_catalog.pg_proc p
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace
LEFT JOIN pg_catalog.pg_type t ON t.oid=p.prorettype
WHERE t.typname <> 'trigger'
AND NOT EXISTS (SELECT 1 FROM pg_catalog.pg_depend d WHERE d.refclassid = 'pg_catalog.pg_extension'::pg_catalog.regclass AND d.objid = p.oid AND d.deptype = 'e')
$schema_clause
};