From: | "Jose' Soares" <jose(at)sferacarta(dot)com> |
---|---|
To: | Jan Wieck <jwieck(at)debis(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [HACKERS] about RULES |
Date: | 1999-01-19 12:30:37 |
Message-ID: | 36A47AED.CC000243@sferacarta.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>
> In the case of a qualified instead rule, the parsetree get's
> splitted. One with the qual, one with the negated qual. If
> you only want 'SALESMAN's, you must put the qualification
> into the INSERT action of the rule as
>
> create rule "_INSvista" as on insert to vista
> do instead
> insert into emp select new.empno, new.ename, new.job
> where new.job='SALESMAN';
I see that rules is more complex than I thougth.
I tried your example Jan but it doesn't work...
create rule "_INSvista" as on insert to vista
do instead
insert into emp select new.empno, new.ename, new.job
where new.job='SALESMAN';
ERROR: Type of empno does not match target column ename
-Jose'-
From | Date | Subject | |
---|---|---|---|
Next Message | José Paumard | 1999-01-19 14:08:42 | Error using home-made functions |
Previous Message | Michael Meskes | 1999-01-19 10:13:01 | Re: [HACKERS] performance test |