Skip site navigation (1) Skip section navigation (2)

Re: CREATE ROLE

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: Russell Denney <r_denney(at)verizon(dot)net>, postgres <pgsql-novice(at)postgresql(dot)org>
Subject: Re: CREATE ROLE
Date: 2006-12-19 21:56:44
Message-ID: 864147.3824.qm@web31803.mail.mud.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-novice
> Logged in as postgres, I created a role as Superuser. psql returned  
> CREATE ROLE.
> When I enter \du it lists the new role, however, createdb and  
> createrole are listed as "no". I thought superusers bypassed all   
> permissions?

the real superuser user account is postgres.  If you want to create a role that will have more
than the default priveledges you must granted:
http://www.postgresql.org/docs/8.2/interactive/sql-grant.html

> When I \q, psql returns "could not save history to file "/Users/ 
> postgres/.psql_history": Invalid argument". Of what significance is  
> this at this point and how do I correct it?

I expect that mean that your postgres unix user account doesn't have a home directory to save
these files.  At home directory is created by default on my system either.

I tried this with and  
> without  the -U flag. Any clue as to what is going on?

if you do not specify an actual postgresql db account it tries to use your unix user account
instead.  If your unix user name doesn't exist in postgresql you get this error.
try "-U <one of you postgresql usernames>"

The following link should give 80% of everything you want to know.
http://www.postgresql.org/docs/8.2/interactive/tutorial.html

Regards,

Richard Broersma Jr.


In response to

  • CREATE ROLE at 2006-12-19 20:41:16 from Russell Denney

Responses

pgsql-novice by date

Next:From: nhrcommuDate: 2006-12-19 22:07:10
Subject: Re: CREATE ROLE
Previous:From: Frank BaxDate: 2006-12-19 21:27:03
Subject: Re: print statements?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group