In postgresql return result of a function in a rule when performing INSERT INTO RETURNING

Posted by Dmitry on Stack Overflow See other posts from Stack Overflow or by Dmitry
Published on 2010-05-24T09:46:13Z Indexed on 2010/05/24 9:51 UTC
Read the original article Hit count: 295

Filed under:
|
|
|

I have a View that has several fields. When i INSERT INTO a view I run a function based on INSERT parametrs. The function returns a value.

How can I retrieve The value from rule? INSERT RETURNING Gives me: ERROR: cannot perform INSERT RETURNING on relation "full_subntes" ?????????: You need an unconditional ON INSERT DO INSTEAD rule with a RETURNING clause.

© Stack Overflow or respective owner

Related posts about postgresql

Related posts about function