public inbox for [email protected]  
help / color / mirror / Atom feed
pgsql user creation query:
2+ messages / 2 participants
[nested] [flat]

* pgsql user creation query:
@ 2002-09-05 20:34  news <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: news @ 2002-09-05 20:34 UTC (permalink / raw)
  To: pgsql-docs

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.





^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: pgsql user creation query:
@ 2002-09-09 15:21  Rod Taylor <[email protected]>
  parent: news <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Rod Taylor @ 2002-09-09 15:21 UTC (permalink / raw)
  To: news <[email protected]>; +Cc: pgsql-docs

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





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2002-09-09 15:21 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-09-05 20:34 pgsql user creation query: news <[email protected]>
2002-09-09 15:21 ` Rod Taylor <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox