Received: from post.webmailer.de (natwar.webmailer.de [192.67.198.70]) by postgresql.org (Postfix) with ESMTP id 314AA474E4E for ; Sun, 10 Mar 2002 13:09:33 -0500 (EST) Received: from eumel.yoo.net (pD952C457.dip.t-dialin.net [217.82.196.87]) by post.webmailer.de (8.9.3/8.8.7) with ESMTP id TAA22921 for ; Sun, 10 Mar 2002 19:09:30 +0100 (MET) Received: by eumel.yoo.net (Postfix on SuSE Linux 7.2 (i386), from userid 500) id C2E441262C; Sun, 10 Mar 2002 19:23:06 +0100 (CET) Date: Sun, 10 Mar 2002 19:23:06 +0100 From: Thorsten Haude To: PostgreSQL Novice ML Subject: create database, user Message-ID: <20020310182306.GS808@eumel.yoo.net> Mail-Followup-To: PostgreSQL Novice ML Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.3.24i X-Warning: Email may contain unsmilyfied humor and/or satire. Keywords: Netz gegen Kinderporno Organization: Ministry of Information, Department of Works X-Archive-Number: 200203/106 X-Sequence-Number: 3233 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