Re: Problems With VIEWS

Поиск
Список
Период
Сортировка
От Richard Broersma Jr
Тема Re: Problems With VIEWS
Дата
Msg-id 943440.66350.qm@web31814.mail.mud.yahoo.com
обсуждение исходный текст
Ответ на Re: Problems With VIEWS  ("Jeanna Geier" <jgeier@apt-cafm.com>)
Ответы Re: Problems With VIEWS  (Bernd Helmle <mailings@oopsware.de>)
Список pgsql-general
> 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.

В списке pgsql-general по дате отправления:

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: Optimize expresiions.
Следующее
От: Bernd Helmle
Дата:
Сообщение: Re: Problems With VIEWS