Search Postgresql Archives

create rule on select question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



test1=# \d+ testb
  View "public.testb"
 Column | Type | Modifiers | Description
--------+---------+--------------------+-------------
 id | bigint | |
 pid | integer | |
 b | integer | not null default 1 |
View definition:
 SELECT testb.id, testb.pid, 1 AS b
  FROM testb
  WHERE testb.b <> 0;

test1=# insert into testb(id, pid) values (1, 666);
ERROR: infinite recursion detected in rules for relation "testb"

I have to admit, I don't get that error. Rule is on select, not insert/update.

--

GJ

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux