database_cleaner-active_record icon indicating copy to clipboard operation
database_cleaner-active_record copied to clipboard

Always exclude `pg_*` tables in PostgreSQL truncation

Open jscheid opened this issue 3 years ago • 0 comments

It's sometimes necessary to add pg_catalog explicitly to the search path (if you don't want it added implicitly at the beginning of the search path). It then gets picked up by current_schemas(false) which causes DatabaseCleaner to attempt truncation of system tables. I can work around it with a monkey patch but I don't think there is ever a reason to want to truncate system tables -- could these be always excluded?

jscheid avatar Sep 13 '22 03:09 jscheid