Antw: [SQL] attribute level rules not supported?

Поиск
Список
Период
Сортировка
От Gerhard Dieringer
Тема Antw: [SQL] attribute level rules not supported?
Дата
Msg-id s882dd23.015@kopo001
обсуждение исходный текст
Список pgsql-sql
>>> Marc Tardif <admin@wtbwts.com> 16.01.2000  14.20 Uhr >>>
> Here's the problem:

> test=> CREATE TABLE a ( refb OID, at INT2 );
> test=> CREATE TABLE b ( refa OID, bt INT2 );
> test=> CREATE RULE ar AS ON UPDATE TO a.at
> test->   DO UPDATE b SET b.bt = NEW.at
> test->   WHERE refa = OLD.oid;
> ERROR: attribute level rules currently not supported

> What am I doing wrong? I've read and re-read chapter 8 - rules from the
> postgresql programmer's guide, but I can't see why this rule doesn't work.
> Any suggestions would be appreciated.
> 
>  Marc


Try:
CREATE RULE ar AS ON UPDATE TO a DO UPDATE b .....

I think you you should speciify the table a, not the attribute a.at.


Gerhard




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

Предыдущее
От: Marc Tardif
Дата:
Сообщение: attribute level rules not supported?
Следующее
От: Marten Feldtmann
Дата:
Сообщение: index usage ... strange !?