Thread: Can you write into a view?

Can you write into a view?

From
Fernando Dougnac
Date:
Hello, I'm a new into the postgres's world, and I was
seeing the User's Guide from V.6.4 and I saw that you
can write into a View. In the new versions can you? If
not, have any body any idea of when it would be
reality?

         Thanks
                Fernando Dougnac



=====

__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com

Re: [GENERAL] Can you write into a view?

From
Brook Milligan
Date:
   Hello, I'm a new into the postgres's world, and I was
   seeing the User's Guide from V.6.4 and I saw that you
   can write into a View. In the new versions can you? If
   not, have any body any idea of when it would be
   reality?

You can do so now.  Just create a ON INSERT rule for the view.  You
can also create ON DELETE and ON UPDATE rules.  As a result, views can
be made to respond just like tables.  See Jan's excellent description
in the docs on how to use rules.  I think he has all this covered,
including examples.

Cheers,
Brook