Rule problem

Поиск
Список
Период
Сортировка
От Kiarash Bodouhi
Тема Rule problem
Дата
Msg-id 002b01c4aed9$54ea3d30$0a00a8c0@kibotop2
обсуждение исходный текст
Ответы Re: Rule problem
Список pgsql-general

 

Hello all

 

I tried to use following rule instead of using a default value(I want to be able to put a function instead of the constant value later on). But it keeps giving me infinite recursion error. Any ideas?

 

CREATE OR REPLACE RULE "INSERT" AS

  ON INSERT TO customer_rate where new.code is null DO INSTEAD  INSERT INTO customer_rate (prefix, rate, name, code,groupid)

  VALUES (new.prefix, new.rate, new.name,'1',new.groupid);

 

Thanking you in advance

Regards

Kia

 

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