Search Postgresql Archives

Re: Problems With VIEWS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> So, herein probably lies my problem with the "Cannont insert into a view"
> error I'm getting anytime I'm attempting to access it from my program -
> there are no rules set up for them, right?

Correct, without insert rules you will not be able to add new records to the underlying tables of
a view.


> So, if I manually enter them for
> each VIEW and do a BACKUP and then RESTORE, should they still be attached to
> each of the VIEWS?

What exactly would you be backing up and restoring?  I expect that you can add new rules to these
views from psql without even disconnecting from CASEStudio or anyother client program.  Once the
rulse are added, inserts that did not work before will start working.

> I would think CASEStudio would have this capabilty to
> export these, but at this point I need to get our application and the VIEWS
> working and if I need to take the time to enter each RULE for the VIEWS
> manually, so be it.

Either way.  I like to create sql files with all of the DDL for creating the view and rules. 
Overtime, if I need to change my view or reconfigure the rules, I can edit my sql file and then
call it up in psql using "\e <view_def.sql>"

I use the "CREATE OR REPLACE VIEW" syntax to achieve this.

Regards,
Richard Broersma Jr.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux