This factory function is not really needed any more. It was mostly used to speed postgresql-based tests (using custom setup/teardown methods doing table truncation instead of full db drop and recreate).
Recent(ish) versions of pytest_postgresql do provide a db creation process speedup using a preconfigured and setup template db to create the database used in each test.
With the work done in f8a07dfa0bf6 (an following revisions), we do not need this custom setup/teardown any more, so it should be deprecated and its usage adapted to stock pytest_postgresql factory function in every dependency still using it.