"Donald Fraser" <demolish(at)cwgsy(dot)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