Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id DC0189FA182 for ; Sat, 9 Dec 2006 23:37:32 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 84628-04 for ; Sat, 9 Dec 2006 23:37:28 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 38E449FA162 for ; Sat, 9 Dec 2006 23:37:29 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id kBA3bQ0d027891; Sat, 9 Dec 2006 22:37:27 -0500 (EST) To: Philippe Salama cc: PostgreSQL Admin Subject: Re: \c bpsimple rick In-reply-to: <279843.92978.qm@web90515.mail.mud.yahoo.com> References: <279843.92978.qm@web90515.mail.mud.yahoo.com> Comments: In-reply-to Philippe Salama message dated "Sat, 09 Dec 2006 16:13:30 -0800" Date: Sat, 09 Dec 2006 22:37:26 -0500 Message-ID: <27890.1165721846@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/130 X-Sequence-Number: 23922 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