pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thorsten Haude <postgresql@thorstenhau.de>
To: PostgreSQL Novice ML <pgsql-novice@postgresql.org>
Subject: create database, user
Date: Sun, 10 Mar 2002 19:23:06 +0100
Message-ID: <20020310182306.GS808@eumel.yoo.net> (raw)

Hi,

I want to create a database and a matching user for a web application.
I want to do all that from an SQL file but I have problems with both
'create database' and 'create user'.

- I have still not grasped how I should connect to the DBMS for things
like that; there is no root. Is there a document describing best
practices somewhere?

- Are there any special provisions you have to follow to do create
database, user, tables and other object with one SQL file?

For the ones knowing MySQL, what I want to do is something like this:
- - - Schnipp - - -
[Connect as Administrator]
create database dbName;

grant all
    on dbName
    to userName
    identified by 'secret';

use inventory;

create table items
(
    [...]
);
- - - Schnapp - - -

Thanks in advance for any help!

Thorsten
-- 
Die Zensur ist das lebendige Geständnis der Großen, daß sie nur
verdummte Sklaven aber keine freien Völker regieren können.
	- Johann Nepomuk Nestroy



view thread (7+ messages)  latest in thread

Message-ID: <20020310182306.GS808@eumel.yoo.net>
Permalink:  ../20020310182306.GS808@eumel.yoo.net/
Also on:    postgresql.org/message-id/20020310182306.GS808@eumel.yoo.net

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: postgresql@thorstenhau.de, pgsql-novice@postgresql.org
  Subject: Re: create database, user
  In-Reply-To: <20020310182306.GS808@eumel.yoo.net>
  References: <20020310182306.GS808@eumel.yoo.net>

* 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