Re: [HACKERS] CREATE USER and pg_user

2005-08-24 Thread William ZHANG
- Original Message - From: "Jim C. Nasby" <[EMAIL PROTECTED]> To: "William ZHANG" <[EMAIL PROTECTED]> Cc: Sent: Wednesday, August 24, 2005 3:27 AM Subject: Re: [HACKERS] CREATE USER and pg_user > You should take a look at > http://lnk.nu/develo

Re: [HACKERS] CREATE USER and pg_user

2005-08-23 Thread Jim C. Nasby
On Tue, Aug 23, 2005 at 09:26:07AM +0800, William ZHANG wrote: > ""Jim Nasby"" <[EMAIL PROTECTED]> write > > Yes, but it doesn't really specify if you have to have a privilege in > > order to grant it, although reading one of the notes[1] tends to indicate > > that you must have a role in order t

Re: [HACKERS] CREATE USER and pg_user

2005-08-23 Thread Jim C. Nasby
On Mon, Aug 22, 2005 at 10:42:15PM -0400, Tom Lane wrote: > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > My original point was that if you don't have permission to do something, > > you shouldn't be able to grant permissions to do it. This applies to all > I'm not convinced. It seems reasonable

Re: [HACKERS] CREATE USER and pg_user

2005-08-23 Thread William ZHANG
""Jim Nasby"" <[EMAIL PROTECTED]> write > Yes, but it doesn't really specify if you have to have a privilege in > order to grant it, although reading one of the notes[1] tends to indicate > that you must have a role in order to grant it. Unless I'm overlooking > some part of the docs? I am conf

Re: [HACKERS] CREATE USER and pg_user

2005-08-22 Thread Tom Lane
"Jim C. Nasby" <[EMAIL PROTECTED]> writes: > My original point was that if you don't have permission to do something, > you shouldn't be able to grant permissions to do it. This applies to all > the permissions, not just superuser (though that one's obviously the > most dangerous). Granted, at this

Re: [HACKERS] CREATE USER and pg_user

2005-08-22 Thread Jim C. Nasby
On Mon, Aug 22, 2005 at 09:19:46PM -0400, Tom Lane wrote: > "Jim Nasby" <[EMAIL PROTECTED]> writes: > > Yes, but it doesn't really specify if you have to have a privilege in order > > to grant it, although reading one of the notes[1] tends to indicate that > > you must have a role in order to gra

Re: [HACKERS] CREATE USER and pg_user

2005-08-22 Thread Tom Lane
"Jim Nasby" <[EMAIL PROTECTED]> writes: > Yes, but it doesn't really specify if you have to have a privilege in order > to grant it, although reading one of the notes[1] tends to indicate that you > must have a role in order to grant it. Unless I'm overlooking some part of > the docs? It says

Re: [HACKERS] CREATE USER and pg_user

2005-08-22 Thread Jim Nasby
> -Original Message- > From: Tom Lane [mailto:[EMAIL PROTECTED] > Sent: Monday, August 22, 2005 3:18 PM > To: Jim Nasby > Cc: Bruno Wolff III; William ZHANG; pgsql-hackers@postgresql.org > Subject: Re: [HACKERS] CREATE USER and pg_user > > > "Jim C. N

Re: [HACKERS] CREATE USER and pg_user

2005-08-22 Thread Tom Lane
"Jim C. Nasby" <[EMAIL PROTECTED]> writes: > On Fri, Aug 12, 2005 at 08:55:09AM -0500, Bruno Wolff III wrote: >> For more information take a look at the CREATE ROLE command in the >> developer docs. > ISTM that it's a bug to be able to assign permissions that you don't > yourself have. In this cas

Re: [HACKERS] CREATE USER and pg_user

2005-08-22 Thread Jim C. Nasby
On Fri, Aug 12, 2005 at 08:55:09AM -0500, Bruno Wolff III wrote: > On Fri, Aug 12, 2005 at 18:11:54 +0800, > William ZHANG <[EMAIL PROTECTED]> wrote: > > "create user foo with createdb" will create a user with createdb privilege. > > "create user bar with createuser" will create s superuser who c

Re: [HACKERS] CREATE USER and pg_user

2005-08-13 Thread William ZHANG
"Tom Lane" <[EMAIL PROTECTED]> wrote:[EMAIL PROTECTED] > "William ZHANG" <[EMAIL PROTECTED]> writes: > > Why not change the option "createuser" to "superuser", > > Backwards compatibility with existing dump files. > > > or do something to make is easier to understand? > > See > http://developer.po

Re: [HACKERS] CREATE USER and pg_user

2005-08-12 Thread Tom Lane
"William ZHANG" <[EMAIL PROTECTED]> writes: > Why not change the option "createuser" to "superuser", Backwards compatibility with existing dump files. > or do something to make is easier to understand? See http://developer.postgresql.org/docs/postgres/sql-createrole.html SUPERUSER NOSUPERUSER

Re: [HACKERS] CREATE USER and pg_user

2005-08-12 Thread Bruno Wolff III
On Fri, Aug 12, 2005 at 18:11:54 +0800, William ZHANG <[EMAIL PROTECTED]> wrote: > "create user foo with createdb" will create a user with createdb privilege. > "create user bar with createuser" will create s superuser who can createdb, > createuser, and update system catalog. > > Why not change

[HACKERS] CREATE USER and pg_user

2005-08-12 Thread William ZHANG
"create user foo with createdb" will create a user with createdb privilege. "create user bar with createuser" will create s superuser who can createdb, createuser, and update system catalog. Why not change the option "createuser" to "superuser", or do something to make is easier to understand? --