Unix Technical Forum

\c bpsimple rick

This is a discussion on \c bpsimple rick within the pgsql Admins forums, part of the PostgreSQL category; --> My textbook had me create a user named rick, with the power to create databases, but not the power ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Admins

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 07:55 AM
Philippe Salama
 
Posts: n/a
Default \c bpsimple rick

My textbook had me create a user named rick, with the power to create databases, but not the power to create new users.

in the next exercise, I am in template1 as user neil, who has the prompt =# which means that neil has power to create databases. I am told to \c bpsimple rick, and it says NOTICE THE PROMPT changes to =>, meaning rick has no power to create databases.

I am confused, since clearly, I created user/role rick as someone with the power to create databases.




---------------------------------
Access over 1 million songs - Yahoo! Music Unlimited.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 07:55 AM
Philippe Salama
 
Posts: n/a
Default Re: \c bpsimple rick

I am guessing that my confusion is over something which may be a typo in the text book.

I have moved along and have now make good progress in running with \i the sql scripts which may be downloaded from

http://www.apress.com/book/supplemen...D=424&sID=2569

the publisher of the book,

to define tables for the exercises, and load the tables with data.

So, thanks for the help here to get me started!

Philippe Salama <karebacnyc@yahoo.com> wrote: My textbook had me create a user named rick, with the power to create databases, but not the power to create new users.

in the next exercise, I am in template1 as user neil, who has the prompt =# which means that neil has power to create databases. I am told to \c bpsimple rick, and it says NOTICE THE PROMPT changes to =>, meaning rick has no power to create databases.

I am confused, since clearly, I created user/role rick as someone with the power to create databases.




---------------------------------
Access over 1 million songs - Yahoo! Music Unlimited.


---------------------------------
Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 07:55 AM
Tom Lane
 
Posts: n/a
Default Re: \c bpsimple rick

Philippe Salama <karebacnyc@yahoo.com> writes:
> My textbook had me create a user named rick, with the power to create databases, but not the power to create new users.
> in the next exercise, I am in template1 as user neil, who has the prompt =# which means that neil has power to create databases. I am told to \c bpsimple rick, and it says NOTICE THE PROMPT changes to =>, meaning rick has no power to create databases.


How old is your textbook?

What the # prompt actually means is that you are a "superuser", which
means you can do anything at all within PostgreSQL (equivalent to root
on a Unix system, and I-dunno-what on Windows). Creating databases
is a lesser privilege. It used to be that creating users was only
allowed to a superuser, but now we have a lesser privilege that allows
non-superusers to create more (non-super) users. In any case, if you
are superuser you can definitely do both of those things.

If the book equates the # prompt to create-database privilege then it's
flat out wrong, or at least has been for as long as I can remember.
If it equates # to create-user privilege then it's only been wrong for
the last release or two.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-10-2008, 07:55 AM
Philippe Salama
 
Posts: n/a
Default Re: \c bpsimple rick

The book has no date I can see, but I purchased it several years ago, and it speaks of PostgreSQL 8 as being new.

As soon as I find the link again to subscribe to the novice forum, I shall do so, and not post in Admin. Thanks!

Tom Lane <tgl@sss.pgh.pa.us> wrote: Philippe Salama writes:
> My textbook had me create a user named rick, with the power to create databases, but not the power to create new users.
> in the next exercise, I am in template1 as user neil, who has the prompt =# which means that neil has power to create databases. I am told to \c bpsimple rick, and it says NOTICE THE PROMPT changes to =>, meaning rick has no power to create databases.


How old is your textbook?

What the # prompt actually means is that you are a "superuser", which
means you can do anything at all within PostgreSQL (equivalent to root
on a Unix system, and I-dunno-what on Windows). Creating databases
is a lesser privilege. It used to be that creating users was only
allowed to a superuser, but now we have a lesser privilege that allows
non-superusers to create more (non-super) users. In any case, if you
are superuser you can definitely do both of those things.

If the book equates the # prompt to create-database privilege then it's
flat out wrong, or at least has been for as long as I can remember.
If it equates # to create-user privilege then it's only been wrong for
the last release or two.

regards, tom lane



---------------------------------
Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:57 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com