pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rod Taylor <rbt@rbt.ca>
To: news <da@da.com>
Cc: pgsql-docs@postgresql.org
Subject: Re: pgsql user creation query:
Date: 09 Sep 2002 11:21:50 -0400
Message-ID: <1031584910.268.36.camel@jester> (raw)
In-Reply-To: <cdPd9.18772$Dr5.77332@news-server.bigpond.net.au>
References: <cdPd9.18772$Dr5.77332@news-server.bigpond.net.au>

In 7.2 you must create the database as the user.
CREATE USER <user> CREATEDB;
\c - <user>
CREATE DATABASE <db>;
ALTER USER <user> NOCREATEDB;

In 7.3 you can:
CREATE DATABASE <db> WITH OWNER = <user>;

On Thu, 2002-09-05 at 16:34, news wrote:
> Hi all,
> 
> I'm just starting out with pgsql, moving away from mysql as I'm missing
> having a procedural language. Anyway, I apologise if this is an easily
> resolved problem, I have looked through the docs for any answers but they
> don't seem to be coming easily.
> 
> I'm wondering if it's possible to create a user and assign that user as an
> owner of a database, so that user can do pretty much anything they wish to
> that database and any existing and to-be-created objects within it?
> 
> I hope this makes sense
> Thank you all for your time,
> Michael.
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
> http://archives.postgresql.org
> 
-- 
  Rod Taylor




view thread (2+ messages)

Message-ID: <1031584910.268.36.camel@jester>
Permalink:  ../1031584910.268.36.camel@jester/
Also on:    postgresql.org/message-id/1031584910.268.36.camel@jester

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: rbt@rbt.ca, da@da.com
  Subject: Re: pgsql user creation query:
  In-Reply-To: <1031584910.268.36.camel@jester>

* 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