471,320 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,320 software developers and data experts.

drop user question

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
2 1351
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
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.

Similar topics

13 posts views Thread by Leszek Taratuta | last post: by
4 posts views Thread by Rudy | last post: by
2 posts views Thread by Woody Splawn | last post: by
reply views Thread by thebison | last post: by
reply views Thread by Scott | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.