Обсуждение: drop user question

Поиск
Список
Период
Сортировка

drop user question

От
"frank_lupo"
Дата:
I have create user PIPPO:
CREATE USER PIPPO;

I have create a table:
create table aa (id int4);
Change owner of table to  user PIPPO.
alter table aa owner pippo;

I drop user  PIPPO. Who is the owner of the table?

Thanks.


Bye !!
Frank Lupo (Wolf) !!

       /\_ _/\
       \ o o /
--ooo-----ooo---



--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f

Sponsor:
Usi ancora fax e carta? Allora sei preistorico! Oggi i fax li ricevi direttamente sul computer con il nuovo EmailFax IN
Clicca e scopri i vantaggi
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=1568&d=10-11

Re: drop user question

От
Rob Storrs
Дата:
According to my test (pg 7.2.4), the owner of the table will be null
after the user PIPPO is dropped.

test=# \dt aa
   List of relations
  Name | Type  | Owner
------+-------+-------
  aa   | table | pippo

test=# drop user PIPPO;
DROP USER

test=# \dt aa
   List of relations
  Name | Type  | Owner
------+-------+-------
  aa   | table |

Hope that helps.
~R

ps. I had to change the syntax of your alter table statement to "alter
table aa owner to pippo;" for it to work.


frank_lupo wrote:

> I have create user PIPPO:
> CREATE USER PIPPO;
>
> I have create a table:
>
> create table aa (id int4);
> Change owner of table to  user PIPPO.
> alter table aa owner pippo;
>
> I drop user  PIPPO. Who is the owner of the table?
>
> Thanks.
>
>
> Bye !!
> Frank Lupo (Wolf) !!
>
>        /\_ _/\
>        \ o o /
> --ooo-----ooo---
>
>
>
> --
> Email.it, the professional e-mail, gratis per te: http://www.email.it/f
>
> Sponsor:
> Usi ancora fax e carta? Allora sei preistorico! Oggi i fax li ricevi direttamente sul computer con il nuovo EmailFax
IN
> Clicca e scopri i vantaggi
> Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=1568&d=10-11
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
>                http://archives.postgresql.org
>



Re: drop user question

От
Alvaro Herrera
Дата:
On Mon, Nov 10, 2003 at 04:45:10PM -0800, Rob Storrs wrote:
> According to my test (pg 7.2.4), the owner of the table will be null
> after the user PIPPO is dropped.

That's what it seems, but in reality the owner is the ID the PIPPO had.
If you create another user with the same ID, he will be the new owner of
the table.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"No hay ausente sin culpa ni presente sin disculpa" (Prov. francés)

Re: drop user question

От
"frank_lupo"
Дата:
> On Mon, Nov 10, 2003 at 04:45:10PM -0800, Rob Storrs wrote:
> > According to my test (pg 7.2.4), the owner of the table will be null
> > after the user PIPPO is dropped.
>
> That's what it seems, but in reality the owner is the ID the PIPPO had.
> If you create another user with the same ID, he will be the new owner of
> the table.
 
Thanks,
In other database is not possible drop user if user have permision on object database.
 
> --
> Alvaro Herrera ()
> "No hay ausente sin culpa ni presente sin disculpa" (Prov. francés)
>
 
Bye !!
Frank Lupo (Wolf) !!
 
 

----
Email.it, the professional e-mail, gratis per te: clicca qui

Sponsor:
Il notebook che hai sempre desiderato lo trovi su Ebest
Clicca qui

Re: drop user question

От
"frank_lupo"
Дата:
> > On Mon, Nov 10, 2003 at 04:45:10PM -0800, Rob Storrs wrote:
> > > According to my test (pg 7.2.4), the owner of the table will be null
> > > after the user PIPPO is dropped.
> >
> > That's what it seems, but in reality the owner is the ID the PIPPO had.
> > If you create another user with the same ID, he will be the new owner of
> > the table.
>  

> Thanks,
> In other database is not possible drop user if user have permision on object database.
Sorry, if user have owner no permision.
 
>  
> > --
> > Alvaro Herrera ()
> > "No hay ausente sin culpa ni presente sin disculpa" (Prov. francés)
> >

Bye !!
Frank Lupo (Wolf) !!
 
/\_ _/\
\ o o /
--ooo-----ooo---
 

----
Email.it, the professional e-mail, gratis per te: clicca qui

Sponsor:
Quattro itinerari per quattro stagioni, alla scoperta di monumenti storici, luoghi di culto e splendidi scenari naturali... INFO 0125 665500
Clicca qui