Re: Update instead rules on Views

Поиск
Список
Период
Сортировка
От Markus Schaber
Тема Re: Update instead rules on Views
Дата
Msg-id 20041102162037.306d4d0a@kingfisher.intern.logi-track.com
обсуждение исходный текст
Ответ на Update instead rules on Views  (Markus Schaber <schabios@logi-track.com>)
Ответы Re: Update instead rules on Views
Список pgsql-sql
Helo,

On Tue, 2 Nov 2004 13:05:07 +0100
Markus Schaber <schabios@logi-track.com> wrote:

> -- But to remain compatibility with old apps, we also need to manage
> -- updates to the view, which are to be rewritten as follows:
> CREATE RULE testview_update_rule
> AS ON UPDATE TO testview DO INSTEAD
>     UPDATE realdata SET
>         index = NEW.index,
>         data = NEW.data,
>         obsolete=NULL
>     ;

I now got it to work with adding a "WHERE index=NEW.index" to the view.

Am I correct in my assumption that this means that this only works when
I have a primary key (or at least unique) row in my dataset?

Thanks,
Markus
--
markus schaber | dipl. informatiker
logi-track ag | rennweg 14-16 | ch 8001 zürich
phone +41-43-888 62 52 | fax +41-43-888 62 53
mailto:schabios@logi-track.com | www.logi-track.com


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

Предыдущее
От: Achilleus Mantzios
Дата:
Сообщение: Re: 'show databases' in psql way?
Следующее
От: "Arash Zaryoun"
Дата:
Сообщение: Re: 'show databases' in psql way?