Unix Technical Forum

Change definition of a view

This is a discussion on Change definition of a view within the pgsql Sql forums, part of the PostgreSQL category; --> Hello, one question: Is it possible to add or remove a column from a view without drop the view ...


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

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 01:12 PM
Andreas Roth
 
Posts: n/a
Default Change definition of a view

Hello,

one question: Is it possible to add or remove a column from a view without
drop the view and recreate it?

If one or more rules depend on a view, it's very hard to extend a view.
I use the following procedure to extend a view:
- drop depending rules
- drop view
- recreate view with additional column
- recreate all rules

Any help is welcomed!

Thanks,
Andreas Roth

---------------------------(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-19-2008, 01:12 PM
Keith Worthington
 
Posts: n/a
Default Re: Change definition of a view

On Thu, 9 Feb 2006 18:11:24 +0100, Andreas Roth wrote
> Hello,
>
> one question: Is it possible to add or remove a column from a view
> without drop the view and recreate it?
>
> If one or more rules depend on a view, it's very hard to extend a
> view. I use the following procedure to extend a view: - drop depending
> rules - drop view - recreate view with additional column - recreate
> all rules
>
> Any help is welcomed!
>
> Thanks,
> Andreas Roth


Andreas,

I believe that is exactly what you have to do.

Kind Regards,
Keith

---------------------------(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
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 11:30 AM.


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