It's PDO, but I think that unfortunately doesn't entirely abstract away the actual database, does it? MySQL/MariaDB because of local XAMPP. Any special preference for PostgreSQL, why so?
PDO does actually extract the database away. You just install php-pgsql instead php-mysql. nextcloud uses pdo and works great this way with either pgsql or mysql.
If I remember correctly, wasn't it the case that PostgreSQL uses a different convention for naming tables, so "normal" table names without schema and a dot don't work? Or would it be possible to "fully qualify" table names including their database name and a dot in MySQL/MariaDB too, instead of USE? I think this was one difference I had problems with back in the day.
Well, postgresql offers features like message queues and key lookups like redis, so it reduces total backend complexity for me. It also ran about 1/2 to 1/3 the size in memory than mariadb on my alpine box.