Re: Rules - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Rules
Date
Msg-id 20556.1086789805@sss.pgh.pa.us
Whole thread Raw
In response to Rules  (Darko Prenosil <darko.prenosil@finteh.hr>)
List pgsql-hackers
Darko Prenosil <darko.prenosil@finteh.hr> writes:
> CREATE RULE child_ins AS ON INSERT TO test.child
> DO INSTEAD SELECT test.testfi(NEW);

> INSERT INTO test.child(id,id_data,opis,podaci) VALUES (1,1,'Opis','podaci');

>     (-403)ERROR:  cannot handle whole-row reference

It works in CVS tip ;-).  No chance in 7.4 or earlier, however.
You'll have to pass the components of the row as separate arguments
to the function.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Improving postgresql.conf
Next
From: Greg Stark
Date:
Subject: Re: sequences and "addval('myseq', value)"