Add test for querying datname from pg_database

This is my use case for the "name" type.