Re: Parsing the result of a function to a view in an INSERT statement. - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Parsing the result of a function to a view in an INSERT statement.
Date
Msg-id 12849.1051189116@sss.pgh.pa.us
Whole thread Raw
In response to Parsing the result of a function to a view in an INSERT statement.  ("Donald Fraser" <demolish@cwgsy.net>)
List pgsql-bugs
"Donald Fraser" <demolish@cwgsy.net> writes:
> I have observed that using a function to provide a default value on a colum=
> n of a view or attempting to parse the result of a function to a view in an=
>  insert or update statement produces undesirable results.

Rules are macros and as such you have to think about multiple
evaluations of their arguments.  You would probably be better off using
triggers for what you seem to be trying to accomplish.

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Donald Fraser"
Date:
Subject: Parsing the result of a function to a view in an INSERT statement.
Next
From: Tom Lane
Date:
Subject: Re: PostgreSQL 7.3 Installation Error