Rule Question

Поиск
Список
Период
Сортировка
От Andrew Bartley
Тема Rule Question
Дата
Msg-id CAA3RN+xWJ3hbmVQMaVqWDNNMvA-4AX1i6+9aDX78qWoQrvo1hg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Rule Question  (Sergey Konoplev <gray.ru@gmail.com>)
Re: Rule Question  (Luca Ferrari <fluca1978@infinito.it>)
Re: Rule Question  (Giuseppe Broccolo <giuseppe.broccolo@2ndquadrant.it>)
Список pgsql-general
Hi all,

Hope this question is not too stupid but......

I am trying to do something like this

create table cats (a text,b text);

create rule cats_test as on update to cats do set a = new.b;

Can i manipulate column "a" sort of like this...  or is  there a better way.



I would like to do this as the construction of the new.b value is complex and time consuming, so I just want to do it once.  

update cats
set b = something_complex_and_time_consuming(b);    


Thanks

Andrew 

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

Предыдущее
От: devonline
Дата:
Сообщение: Re: Tablespace on Postgrsql
Следующее
От: Luca Ferrari
Дата:
Сообщение: Re: Why are stored procedures looked on so negatively?