Re: [SQL] Question about insert/update RULEs.

2005-01-10 Thread Ron Peterson
On Sun, Jan 09, 2005 at 06:45:54AM -0500, Dmitri Bichko wrote: > CREATE TABLE "foo" ( > "foo_id"serial PRIMARY KEY, > "type" varchar NOT NULL DEFAULT 'base' CONSTRAINT types CHECK > (type IN ('base', 'bar')) > "a" varchar NOT NULL, > "b" varchar DEFAULT 'some text'

[SQL] Question about insert/update RULEs.

2005-01-09 Thread Dmitri Bichko
Hello, I am trying to use the RULE system to simulate updatable views, with the final goal of simulating polymorphism in an ORM-like system (Class::DBI). Same old idea - when selecting from foo C:DBI checks the "type" column and reblesses (I guess casts, in non-perl world) the object to the appro