Unix Technical Forum

Change view ownership

This is a discussion on Change view ownership within the pgsql Hackers forums, part of the PostgreSQL category; --> IIRC there was an intention to allow ownership reassignment of all objects in the database. Somehow views got missed ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-12-2008, 05:14 AM
Jim C. Nasby
 
Posts: n/a
Default Change view ownership

IIRC there was an intention to allow ownership reassignment of all
objects in the database. Somehow views got missed (probably because they
don't currently have an ALTER command). If there isn't a lot of code
involved in making this happen, I'd argue it should go in as a bug fix.
If not, can we add it to the TODO for 8.3?
--
Jim Nasby jim@nasby.net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-12-2008, 05:14 AM
Neil Conway
 
Posts: n/a
Default Re: Change view ownership

On Tue, 2006-10-10 at 20:17 -0500, Jim C. Nasby wrote:
> IIRC there was an intention to allow ownership reassignment of all
> objects in the database. Somehow views got missed


ALTER TABLE can change view ownership (as well as sequence ownership).
You could argue for the addition of an ALTER VIEW ... OWNER TO, but IMHO
it is not something that is urgent enough for inclusion in 8.2

-Neil



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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-12-2008, 05:14 AM
Jim C. Nasby
 
Posts: n/a
Default Re: Change view ownership

On Tue, Oct 10, 2006 at 09:23:34PM -0400, Neil Conway wrote:
> On Tue, 2006-10-10 at 20:17 -0500, Jim C. Nasby wrote:
> > IIRC there was an intention to allow ownership reassignment of all
> > objects in the database. Somehow views got missed

>
> ALTER TABLE can change view ownership (as well as sequence ownership).
> You could argue for the addition of an ALTER VIEW ... OWNER TO, but IMHO
> it is not something that is urgent enough for inclusion in 8.2


Wow, that's news to me. I'll prepare a docs patch to reflect that.

Is there any other operations ALTER TABLE can perform on a view?
--
Jim Nasby jim@nasby.net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-12-2008, 05:14 AM
Neil Conway
 
Posts: n/a
Default Re: Change view ownership

On Tue, 2006-10-10 at 20:27 -0500, Jim C. Nasby wrote:
> Wow, that's news to me. I'll prepare a docs patch to reflect that.


It is already reflected in the docs, although it might need to be more
prominent.

> Is there any other operations ALTER TABLE can perform on a view?


IIRC, it can be used to rename an index, sequence, or view, and also to
add defaults to a view's columns.

-Neil



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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-12-2008, 05:14 AM
Jim C. Nasby
 
Posts: n/a
Default Re: Change view ownership

On Tue, Oct 10, 2006 at 09:33:13PM -0400, Neil Conway wrote:
> On Tue, 2006-10-10 at 20:27 -0500, Jim C. Nasby wrote:
> > Wow, that's news to me. I'll prepare a docs patch to reflect that.

>
> It is already reflected in the docs, although it might need to be more
> prominent.


Yeah, it should be listed at the top of the page, IMO.

> > Is there any other operations ALTER TABLE can perform on a view?

>
> IIRC, it can be used to rename an index, sequence, or view, and also to
> add defaults to a view's columns.


I don't see anything about indexes...

I think it'd be best to move this functionality out of ALTER TABLE and
put it in the appropriate ALTER commands (well, we can't move it out
yet, but we should depricate it).
--
Jim Nasby jim@nasby.net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:50 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com