Change Default Database

Поиск
Список
Период
Сортировка
От Rommel the iCeMAn
Тема Change Default Database
Дата
Msg-id 008401c759c6$81bef2c0$b364a8c0@theport.com
обсуждение исходный текст
Ответы Re: Change Default Database  (Richard Huxton <dev@archonet.com>)
Re: Change Default Database  ("Rodrigo De León" <rdeleonp@gmail.com>)
Re: Change Default Database  (Scott Marlowe <smarlowe@g2switchworks.com>)
Список pgsql-sql
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.
 
Вложения

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

Предыдущее
От: T E Schmitz
Дата:
Сообщение: Re: pg_dump fails (timestamp out of range)
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Change Default Database