I have a function (plpgsql) and would like it to have access to the name of the current database. Unfortunately, I dont know how to ask the question. I've look in the documentation, and I can get a list of possible databases from pg_database, but I dont know which one I'm currently in. dave ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html