By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,712 Members | 1,958 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,712 IT Pros & Developers. It's quick & easy.

drop user question

P: n/a
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....d=1568&d=10-11

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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....d=1568&d=10-11

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 12 '05 #2

P: n/a
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)

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.