Search Postgresql Archives

Using result from current_database() into another command?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux