Unix Technical Forum

Re: Change Default Database

This is a discussion on Re: Change Default Database within the pgsql Sql forums, part of the PostgreSQL category; --> On Mon, 2007-02-26 at 10:52, Rommel the iCeMAn wrote: > Hi list, > > I wrote a database creation ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Sql

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 04:09 PM
Scott Marlowe
 
Posts: n/a
Default Re: Change Default Database

On Mon, 2007-02-26 at 10:52, Rommel the iCeMAn 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?


A couple of points:

1: PLEASE don't post html email, especially with an annoying background
that makes it harder to read your message.

2: What kind of script is this? sql? bash? PHP? perl?

If you post the script, we can probably help you out a bit.

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:35 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com