Thread: 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)
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
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)
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
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)