select current_database();
current_database
------------------
test2

Is there a way to use that result from current_database() into something like: alter database CURRENT_DATABASE() set search_path=myschema,public;

I have some generic scripts that I am preparing for several databases. Most commands/loads don't care about the database, since they just use the one I am connected to. Alter database however needs the database specified.
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

              http://www.postgresql.org/docs/faq

Reply via email to