Re: virtual fields on VIEW?

Поиск
Список
Период
Сортировка
От raptor@tvskat.net
Тема Re: virtual fields on VIEW?
Дата
Msg-id 20040618173821.37ea99d2@bugs
обсуждение исходный текст
Ответ на Re: virtual fields on VIEW?  (Richard Huxton <dev@archonet.com>)
Ответы Database corruption using 7.4.1
Re: virtual fields on VIEW?
Список pgsql-general
> SELECT ...
>    CASE
>      WHEN date < CURRENT_DATE THEN 'green'::text
>      WHEN date > CURRENT_DATE THEN 'red'::text
>      ELSE 'blue'::text
>    END
>    AS state,
>    (t1.field2 || t2.fieldA) AS stuff
> FROM ...

]- aha thanx..

> >>> BOTH state and stuff will be only available for SELECTs on the
> >>> view i.e. they are not updatable ..
>
> All views in PG are read-only. If you want to make the view updatable,
> you'll need to write your own rules (see manuals for details).

]- yep, i have to write RULES how updates/inserts will be propagandated( i made a quick read
of this section from the docs..)

> --
>    Richard Huxton
>    Archonet Ltd
>

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