From: Rommel the iCeMAn <icecrew@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Change Default Database
Date: Mon, 26 Feb 2007 12:52:19 -0400
Message-ID: <008401c759c6$81bef2c0$b364a8c0@theport.com> (raw)
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.
Attachments:Notebook.jpg (image/jpeg, 2.9K) downloadview image
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: icecrew@gmail.com
Subject: Re: Change Default Database
In-Reply-To: <008401c759c6$81bef2c0$b364a8c0@theport.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox