Re: [HACKERS] wrong message on REASSIGN OWNED
On Sat, Jun 11, 2011 at 8:01 PM, Robert Haas robertmh...@gmail.com wrote: can't reassign objects owned by %s because this user is internal to the database system ? that message is not that clear... it seems to imply i can't reassign any object from that user... btw, i'm allowed to use ALTER TABLE to assign a new owner (even an unprivileged one) to a system catalog, probably that's a bug. db=# create role unprivileged_user login; CREATE ROLE db=# alter table pg_class owner to unprivileged_user ; ALTER TABLE db=# \dt pg_class List of relations Schema | Name | Type | Owner +--+---+--- pg_catalog | pg_class | table | unprivileged_user (1 row) -- Jaime Casanova www.2ndQuadrant.com Professional PostgreSQL: Soporte 24x7 y capacitación -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] wrong message on REASSIGN OWNED
On Mon, Jun 13, 2011 at 2:41 AM, Jaime Casanova ja...@2ndquadrant.com wrote: On Sat, Jun 11, 2011 at 8:01 PM, Robert Haas robertmh...@gmail.com wrote: can't reassign objects owned by %s because this user is internal to the database system ? that message is not that clear... it seems to imply i can't reassign any object from that user... cannot change owner of some objects owned by %s because they are required by the database system? btw, i'm allowed to use ALTER TABLE to assign a new owner (even an unprivileged one) to a system catalog, probably that's a bug. +1 for tightening that up in 9.2. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] wrong message on REASSIGN OWNED
Robert Haas robertmh...@gmail.com writes: On Mon, Jun 13, 2011 at 2:41 AM, Jaime Casanova ja...@2ndquadrant.com wrote: btw, i'm allowed to use ALTER TABLE to assign a new owner (even an unprivileged one) to a system catalog, probably that's a bug. +1 for tightening that up in 9.2. Nonsense. You won't like the results of DELETE FROM pg_proc; either, but we don't try to put training wheels on superusers. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] wrong message on REASSIGN OWNED
Jaime Casanova ja...@2ndquadrant.com writes: On Sat, Jun 11, 2011 at 8:01 PM, Robert Haas robertmh...@gmail.com wrote: can't reassign objects owned by %s because this user is internal to the database system ? that message is not that clear... it seems to imply i can't reassign any object from that user... I think s/drop/reassign ownership of/ is sufficient. There's no reason to change the rest of the message, especially because the same phraseology is in use elsewhere. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] wrong message on REASSIGN OWNED
On Mon, Jun 13, 2011 at 9:55 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Mon, Jun 13, 2011 at 2:41 AM, Jaime Casanova ja...@2ndquadrant.com wrote: btw, i'm allowed to use ALTER TABLE to assign a new owner (even an unprivileged one) to a system catalog, probably that's a bug. +1 for tightening that up in 9.2. Nonsense. You won't like the results of DELETE FROM pg_proc; either, but we don't try to put training wheels on superusers. allow_system_table_mods? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] wrong message on REASSIGN OWNED
On 06/13/2011 09:55 AM, Tom Lane wrote: Robert Haasrobertmh...@gmail.com writes: On Mon, Jun 13, 2011 at 2:41 AM, Jaime Casanovaja...@2ndquadrant.com wrote: btw, i'm allowed to use ALTER TABLE to assign a new owner (even an unprivileged one) to a system catalog, probably that's a bug. +1 for tightening that up in 9.2. Nonsense. You won't like the results of DELETE FROM pg_proc; either, but we don't try to put training wheels on superusers. Yeah. Amusing anecdote along these lines: I had fun recently recovering the situation for someone who had for reasons I can't even imagine done delete from pg_database; on their production system. cheers andrew -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] wrong message on REASSIGN OWNED
On Mon, Jun 13, 2011 at 8:55 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Mon, Jun 13, 2011 at 2:41 AM, Jaime Casanova ja...@2ndquadrant.com wrote: btw, i'm allowed to use ALTER TABLE to assign a new owner (even an unprivileged one) to a system catalog, probably that's a bug. +1 for tightening that up in 9.2. Nonsense. You won't like the results of DELETE FROM pg_proc; either, but we don't try to put training wheels on superusers. really? i thought we do when system catalogs are involved based on this example: db=# alter table pg_largeobject set tablespace tblspc_prueba; ERROR: permission denied: pg_largeobject is a system catalog -- Jaime Casanova www.2ndQuadrant.com Professional PostgreSQL: Soporte 24x7 y capacitación -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] wrong message on REASSIGN OWNED
Excerpts from Robert Haas's message of sáb jun 11 21:01:55 -0400 2011: On Thu, Jun 9, 2011 at 1:26 PM, Jaime Casanova ja...@2ndquadrant.com wrote: on shdepReassignOwned() we have this message, which is obviously wrong we are not dropping objects just reassigning them... ereport(ERROR, (errcode(ERRCODE_DEPENDENT_OBJECTS_STILL_EXIST), errmsg(cannot drop objects owned by %s because they are required by the database system, getObjectDescription(obj; Oh my. I introduced this mistake 6 years ago and nobody noticed in all this time. I guess this is not a very frequently used feature. but haven't thought of a good way of rephrase it can't reassign objects owned by %s because this user is internal to the database system ? Thanks, I'll use that. -- Álvaro Herrera alvhe...@commandprompt.com The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] wrong message on REASSIGN OWNED
On Mon, Jun 13, 2011 at 10:37 AM, Alvaro Herrera alvhe...@commandprompt.com wrote: Excerpts from Robert Haas's message of sáb jun 11 21:01:55 -0400 2011: On Thu, Jun 9, 2011 at 1:26 PM, Jaime Casanova ja...@2ndquadrant.com wrote: on shdepReassignOwned() we have this message, which is obviously wrong we are not dropping objects just reassigning them... ereport(ERROR, (errcode(ERRCODE_DEPENDENT_OBJECTS_STILL_EXIST), errmsg(cannot drop objects owned by %s because they are required by the database system, getObjectDescription(obj; Oh my. I introduced this mistake 6 years ago and nobody noticed in all this time. I guess this is not a very frequently used feature. well, i used it once last year... ;) but the only reason i found this one was because i was giving a training and it jumps out in the middle of it... -- Jaime Casanova www.2ndQuadrant.com Professional PostgreSQL: Soporte 24x7 y capacitación -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] wrong message on REASSIGN OWNED
Excerpts from Tom Lane's message of lun jun 13 09:57:50 -0400 2011: Jaime Casanova ja...@2ndquadrant.com writes: On Sat, Jun 11, 2011 at 8:01 PM, Robert Haas robertmh...@gmail.com wrote: can't reassign objects owned by %s because this user is internal to the database system ? that message is not that clear... it seems to imply i can't reassign any object from that user... I think s/drop/reassign ownership of/ is sufficient. There's no reason to change the rest of the message, especially because the same phraseology is in use elsewhere. Fixed in 8.2 and up. -- Álvaro Herrera alvhe...@commandprompt.com The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] wrong message on REASSIGN OWNED
On Thu, Jun 9, 2011 at 1:26 PM, Jaime Casanova ja...@2ndquadrant.com wrote: on shdepReassignOwned() we have this message, which is obviously wrong we are not dropping objects just reassigning them... ereport(ERROR, (errcode(ERRCODE_DEPENDENT_OBJECTS_STILL_EXIST), errmsg(cannot drop objects owned by %s because they are required by the database system, getObjectDescription(obj; but haven't thought of a good way of rephrase it can't reassign objects owned by %s because this user is internal to the database system ? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
[HACKERS] wrong message on REASSIGN OWNED
Hi, on shdepReassignOwned() we have this message, which is obviously wrong we are not dropping objects just reassigning them... ereport(ERROR, (errcode(ERRCODE_DEPENDENT_OBJECTS_STILL_EXIST), errmsg(cannot drop objects owned by %s because they are required by the database system, getObjectDescription(obj; but haven't thought of a good way of rephrase it -- Jaime Casanova www.2ndQuadrant.com Professional PostgreSQL: Soporte 24x7 y capacitación -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers