Re: Creating new database

From: Vidhya Bondre <vbondre(at)zedo(dot)com>
To: Malcolm Warren <malcolm(at)villeinitalia(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Creating new database
Date: 2009-11-18 13:16:40
Message-ID: 9cffba1d0911180516n78ab4cf8mc2991821011bb9bb@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

can you specify the exact commands and the sequence. With this set up it
should work.

how do you import the data.

Vidhya

On Wed, Nov 18, 2009 at 5:18 PM, Malcolm Warren
<malcolm(at)villeinitalia(dot)com>wrote:

> Dear All,
>
>
> I've been using a single database for many years.
> I'd now like to create a new separate database with most of the same
> tables, so that I don't have to re-write my code, I'd like to just use a
> different Tomcat datasource to access it.
>
> I had imagined this would be as simple as :
> 1) using createdb, to create a database with a different name, maybe with a
> different postgres user assigned to it,
> 2) using a pg_dump from the original database to import the table creation.
>
> However it doesn't appear to be that simple.
>
> Let's say the old database is called database1, and I've created a new
> database2.
>
> When I import the pg_dump into database2, it tells me that the tables
> already exist (obviously it's talking about the tables in database1).
> But I surely I've created a new database called database2? Why is it
> stopping me from creating the same tables in the new database?
>
> Same sort of problem with psql:
> If I run 'psql database2' then I see everything from database1 as well.
> What am I missing here?
>
>
>
> Thanks for your time.
>
> Malcolm Warren
>
>
>
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dave Coventry 2009-11-18 13:23:38 column does not exist error
Previous Message Thom Brown 2009-11-18 12:40:36 Re: vacuumdb: vacuuming of database "xy" failed: PANIC: corrupted item pointer: 19227