Re: [SQL] Change Default Database

2007-02-26 Thread Rommel the iCeMAn
B!!!, I was there late last November, it must be far worse now! I'll be sticking close to the forums from now on :-) ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgres

Re: [SQL] Change Default Database

2007-02-26 Thread Scott Marlowe
On Mon, 2007-02-26 at 16:02, Rommel the iCeMAn wrote: > I seem to be blundering a lot today! I thought I was replying to the entire > list, didn't realize I replied to one person :-) > > Nothing was wrong with my script, I assumed that since it was generated by > pgAdmin that I could run it inside

Re: [SQL] Change Default Database

2007-02-26 Thread Rommel the iCeMAn
I seem to be blundering a lot today! I thought I was replying to the entire list, didn't realize I replied to one person :-) Nothing was wrong with my script, I assumed that since it was generated by pgAdmin that I could run it inside pgAdmin. It works perfectly when I run it using psql. It is ver

Re: [SQL] Change Default Database

2007-02-26 Thread Scott Marlowe
On Mon, 2007-02-26 at 14:52, Rommel the iCeMAn wrote: > Hi again, > > Apologies for the HTML. > > This is an SQL script, it was generated by doing a schema-only database dump > using pgAdminIII (which in turn uses pgdump I believe). I've attached the > entire script. I was attempting to run this

Re: [SQL] Change Default Database

2007-02-26 Thread Scott Marlowe
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

Re: [SQL] Change Default Database

2007-02-26 Thread Rodrigo De León
On 2/26/07, Rommel the iCeMAn <[EMAIL PROTECTED]> wrote: Thanks for the swift responses, I tried the \c command but I got the following error: ERROR: syntax error at or near "\" SQL state: 42601 Character: 520 Here's a code snippet ... -- -- TOC entry 1685 (class 1262 OID 16453) -- Name: tes

Re: [SQL] Change Default Database

2007-02-26 Thread Rommel the iCeMAn
Thanks for the swift responses, I tried the \c command but I got the following error: ERROR: syntax error at or near "\" SQL state: 42601 Character: 520 Here's a code snippet ... -- -- TOC entry 1685 (class 1262 OID 16453) -- Name: test_db; Type: DATABASE; Schema: -; Owner: postgres -- DROP D

Re: [SQL] Change Default Database

2007-02-26 Thread Rodrigo De León
On 2/26/07, Rommel the iCeMAn <[EMAIL PROTECTED]> 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 def

Re: [SQL] Change Default Database

2007-02-26 Thread Richard Huxton
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

[SQL] Change Default Database

2007-02-26 Thread Rommel the iCeMAn
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 th