Re: [HACKERS] Something I don't understand with the use of schemas

2005-12-12 Thread Jim C. Nasby
On Mon, Dec 12, 2005 at 06:37:03PM -0500, Tom Lane wrote: > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > On Mon, Dec 12, 2005 at 05:43:47PM -0500, Rod Taylor wrote: > >> A sudo equivalent would be a version of psql that always connected to > >> the database using super-user and allowed command ex

Re: [HACKERS] Something I don't understand with the use of schemas

2005-12-12 Thread Guillaume LELARGE
Le Mardi 13 Décembre 2005 00:13, Tom Lane a écrit : > Guillaume LELARGE <[EMAIL PROTECTED]> writes: > > I've made more tests on schemas. I'm able to drop information_schema and > > public schemas but I can't drop pg_catalog and pg_toast. It makes me > > think that only pg_* are system schemas and t

Re: [HACKERS] Something I don't understand with the use of schemas

2005-12-12 Thread Tom Lane
"Jim C. Nasby" <[EMAIL PROTECTED]> writes: > On Mon, Dec 12, 2005 at 05:43:47PM -0500, Rod Taylor wrote: >> A sudo equivalent would be a version of psql that always connected to >> the database using super-user and allowed command execution based on a >> regular expression. Bit of a hack to say the

Re: [HACKERS] Something I don't understand with the use of schemas

2005-12-12 Thread Tom Lane
Guillaume LELARGE <[EMAIL PROTECTED]> writes: > I've made more tests on schemas. I'm able to drop information_schema and > public schemas but I can't drop pg_catalog and pg_toast. It makes me think > that only pg_* are system schemas and that public and information_schema are > public schemas. A

Re: [HACKERS] Something I don't understand with the use of schemas

2005-12-12 Thread Jim C. Nasby
On Mon, Dec 12, 2005 at 05:43:47PM -0500, Rod Taylor wrote: > > > >>>I'd love to see something like SUDO ALTER USER ... SUDO REINDEX ... > > > >>>etc. > > > >>>That would make it easy to do 'normal' work with a non-superuser > > > >>>account. > > A sudo equivalent would be a version of psql that

Re: [HACKERS] Something I don't understand with the use of schemas

2005-12-12 Thread Rod Taylor
On Mon, 2005-12-12 at 16:35 -0600, Jim C. Nasby wrote: > On Mon, Dec 12, 2005 at 05:27:33PM -0500, Andrew Dunstan wrote: > > >On Mon, Dec 12, 2005 at 05:00:45PM -0500, Tom Lane wrote: > > > > > > > > >>"Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > >> > > >> > > >>>I'd love to see something lik

Re: [HACKERS] Something I don't understand with the use of schemas

2005-12-12 Thread Jim C. Nasby
On Mon, Dec 12, 2005 at 05:27:33PM -0500, Andrew Dunstan wrote: > >On Mon, Dec 12, 2005 at 05:00:45PM -0500, Tom Lane wrote: > > > > > >>"Jim C. Nasby" <[EMAIL PROTECTED]> writes: > >> > >> > >>>I'd love to see something like SUDO ALTER USER ... SUDO REINDEX ... etc. > >>>That would make it eas

Re: [HACKERS] Something I don't understand with the use of schemas

2005-12-12 Thread Andrew Dunstan
Jim C. Nasby wrote: On Mon, Dec 12, 2005 at 05:00:45PM -0500, Tom Lane wrote: "Jim C. Nasby" <[EMAIL PROTECTED]> writes: I'd love to see something like SUDO ALTER USER ... SUDO REINDEX ... etc. That would make it easy to do 'normal' work with a non-superuser account. You can

Re: [HACKERS] Something I don't understand with the use of schemas

2005-12-12 Thread Jim C. Nasby
On Mon, Dec 12, 2005 at 05:00:45PM -0500, Tom Lane wrote: > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > I'd love to see something like SUDO ALTER USER ... SUDO REINDEX ... etc. > > That would make it easy to do 'normal' work with a non-superuser > > account. > > You can already do most of this

Re: [HACKERS] Something I don't understand with the use of schemas

2005-12-12 Thread Tom Lane
"Jim C. Nasby" <[EMAIL PROTECTED]> writes: > I'd love to see something like SUDO ALTER USER ... SUDO REINDEX ... etc. > That would make it easy to do 'normal' work with a non-superuser > account. You can already do most of this with SET/RESET ROLE: regression=# create user tgl; CREATE ROLE regres

Re: [HACKERS] Something I don't understand with the use of schemas

2005-12-12 Thread Frank Wiles
On Mon, 12 Dec 2005 14:05:03 -0600 "Jim C. Nasby" <[EMAIL PROTECTED]> wrote: > I think it would be a huge benefit to have something equivalent to > sudo for psql (though maybe it could be generalized more). Having to > change to a different connection/authorization anytime you need to do > somethi

Re: [HACKERS] Something I don't understand with the use of schemas

2005-12-12 Thread Jim C. Nasby
On Sat, Dec 10, 2005 at 09:18:32AM -0800, Joshua D. Drake wrote: > > > >However there is an effort to get rid of root in some Unix lands, > >separating its responsabilities with more granularity. Maybe there > >could be an effort, not to hand-hold the true superusers, but to > >delegate some of it

Re: [HACKERS] Something I don't understand with the use of schemas

2005-12-12 Thread Guillaume LELARGE
Le Samedi 10 Décembre 2005 17:43, vous avez écrit : > Guillaume LELARGE <[EMAIL PROTECTED]> writes: > > Apparently, I can rename all schemas, even system schemas ! > > metier=# alter schema pg_catalog rename to foobar; > > ALTER SCHEMA > > If you are superuser, you can do anything you want, up to a

Re: [HACKERS] Something I don't understand with the use of schemas

2005-12-11 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Regarding CREATEROLE, I wonder why is that a role with that privilege is > able to create other roles containing any privileges (except > superuserness), and not just the privileges the creating role has. The point of CREATEROLE was to allow a role to d

Re: [HACKERS] Something I don't understand with the use of schemas

2005-12-10 Thread Bruno Wolff III
On Sat, Dec 10, 2005 at 14:25:46 -0300, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > Joshua D. Drake wrote: > > > > >However there is an effort to get rid of root in some Unix lands, > > >separating its responsabilities with more granularity. Maybe there > > >could be an effort, not to hand-hold

Re: [HACKERS] Something I don't understand with the use of schemas

2005-12-10 Thread Joshua D. Drake
Like sudo? I was thinking in the thing called "capabilities". I just meant as a metaphor ;) -- Command Prompt, Inc., Your PostgreSQL solutions company. 503-667-4564 Custom programming, 24x7 support, managed services, and hosting Open Source Authors: plPHP, pgManage, Co-Authors: plPerlNG

Re: [HACKERS] Something I don't understand with the use of schemas

2005-12-10 Thread Alvaro Herrera
Joshua D. Drake wrote: > > >However there is an effort to get rid of root in some Unix lands, > >separating its responsabilities with more granularity. Maybe there > >could be an effort, not to hand-hold the true superusers, but to > >delegate some of its responsabilities to other users. > > Like

Re: [HACKERS] Something I don't understand with the use of schemas

2005-12-10 Thread Alvaro Herrera
Tom Lane wrote: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > However there is an effort to get rid of root in some Unix lands, > > separating its responsabilities with more granularity. Maybe there > > could be an effort, not to hand-hold the true superusers, but to > > delegate some of its re

Re: [HACKERS] Something I don't understand with the use of schemas

2005-12-10 Thread Joshua D. Drake
However there is an effort to get rid of root in some Unix lands, separating its responsabilities with more granularity. Maybe there could be an effort, not to hand-hold the true superusers, but to delegate some of its responsabilities to other users. Like sudo? Joshua D. Drake

Re: [HACKERS] Something I don't understand with the use of schemas

2005-12-10 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > However there is an effort to get rid of root in some Unix lands, > separating its responsabilities with more granularity. Maybe there > could be an effort, not to hand-hold the true superusers, but to > delegate some of its responsabilities to other us

Re: [HACKERS] Something I don't understand with the use of schemas

2005-12-10 Thread Alvaro Herrera
Tom Lane wrote: > If you are superuser, you can do anything you want, up to and including > breaking the system irretrievably. Compare "rm -rf /" on Unix. We > won't be putting training wheels on superuser status for the same > reasons that no one finds it a good idea to restrict root's abilities

Re: [HACKERS] Something I don't understand with the use of schemas

2005-12-10 Thread Tom Lane
Guillaume LELARGE <[EMAIL PROTECTED]> writes: > Apparently, I can rename all schemas, even system schemas ! > metier=# alter schema pg_catalog rename to foobar; > ALTER SCHEMA If you are superuser, you can do anything you want, up to and including breaking the system irretrievably. Compare "rm -r

[HACKERS] Something I don't understand with the use of schemas

2005-12-10 Thread Guillaume LELARGE
Hi, At my work, I have to dump a database and restore it on another database under a specific schema. My first idea was to create the new schema on the old database, move all the database objects on this new schema, dump the old db and restore on the new one. But I have to move quite a lot of o