Re: Equivalent to "use database" in postgre

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: Equivalent to "use database" in postgre
Дата
Msg-id 4C24F39F.3070002@hogranch.com
обсуждение исходный текст
Ответ на Equivalent to "use database" in postgre  (javijava <welove.e.music@gmail.com>)
Список pgsql-general
On 06/25/10 4:10 AM, javijava wrote:
> i need to know how to do a simple script  that create a database,the y
> select it (in other languajes using USE) and after create tables with this
> database.
>
>
> How can I say "use name_database" on postgre sql?
>
> Thanks in advance 4 the help!!
>

IF you are using the psql command line utility to execute these scripts,
then
     \c dbname
will connect to a new database.  However, if you're processing these
scripts some other way, then your app will have to disconnect from the
one database and connect to the other itself (this is what the \c
command tells psql to do)



В списке pgsql-general по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Backup issues
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: PG dump and restore