"Teodor Buchner" <t.buch...@autoguard.pl> writes:
> CREATE OR REPLACE RULE move_iteration_1 AS ON INSERT TO a.iteration  DO ALSO

> INSERT INTO b.iteration(id,date_period_begin)
>     SELECT (NEW.id,NEW.date_period_begin) FROM a.iteration;

Your use of parentheses in the SELECT targetlist is incorrect (and would
be with or without the RULE context).  What this is trying to do is
insert a single composite column into the target table.  You want

INSERT INTO b.iteration(id,date_period_begin)
    SELECT NEW.id,NEW.date_period_begin FROM a.iteration;

                        regards, tom lane

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to