Re: Creating a database with psql

From: imi <linimi(at)gmail(dot)com>
To: Josef Springer <Josef(dot)Springer(at)joops(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Creating a database with psql
Date: 2005-07-20 09:54:12
Message-ID: f739e4850507200254147afa4a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

1. connect template1 database with your user.
2. create database YOURDB
3. "\c YOURDB" will connect to new database
4. create table etc.

linimi

On 7/20/05, Josef Springer <Josef(dot)Springer(at)joops(dot)com> wrote:
> Hi,
>
> i want to automate the startup of my database. So i have to create first
> an user and a database, second the schema, all with psql. But how can i
> create a database with psql if no database exist ? Executing psql, i
> must define the options for a database and an user with password.
>
> Best Regards,
> Josef Springer
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dave Cramer 2005-07-20 09:58:10 Re: [HACKERS] Problems compiling Postgresql 8.0.3 on 10.4
Previous Message Andrus 2005-07-20 09:45:28 Re: Postgres crashes,help to recover