Re: Change Default Database

Поиск
Список
Период
Сортировка
От Rodrigo De León
Тема Re: Change Default Database
Дата
Msg-id a55915760702260909r361c0274pa6faf2dee70f44ba@mail.gmail.com
обсуждение исходный текст
Ответ на Change Default Database  ("Rommel the iCeMAn" <icecrew@gmail.com>)
Ответы Re: Change Default Database  ("Rommel the iCeMAn" <icecrew@gmail.com>)
Список pgsql-sql
On 2/26/07, Rommel the iCeMAn <icecrew@gmail.com> wrote:
> Hi list,
>
> I wrote a database creation script that begins with commands to drop the
> existing database (if it exists) and create it from scratch. These commands
> execute fine, the problem is that all subsequent commands are executed on
> the default database 'postgres'. What command can I use to set the default
> database to my newly created database (for the duration of the script)? SQL
> Server has a 'USE [dbname]' command, is there an equivalent command in
> PostgreSQL?
>
> Thanks in advance,
>
> Rommel Edwards
> Software Developer,
> Barbados, Caribbean.

If using psql:

\c dbname

then the rest of the commands.


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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Change Default Database
Следующее
От: "Rommel the iCeMAn"
Дата:
Сообщение: Re: Change Default Database