Support for PostgreSQL in tests, for #1941