Search Postgresql Archives

Re: Variables in SQL scripts

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

 



"Machiel Richards" <machielr@xxxxxxxxx> wrote:

> [...]
>               I did some googling as well and found something I tested using
> a simple method:

> -          I created an sql script to set the variable Name DB

> o   \set DB <dbname>

> o   \c :DB

> -          I connected to postgresql using the postgres database and ran the
> sql script which seemed to work fine as it then connected me to the
> database.

> However will this method work with the above situation as well or are there
> other ways of doing this?
> [...]

Why don't you try it?

Tim


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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