"Nigel J. Andrews" <nandrews@investsystems.co.uk> writes:
> The error message I'm getting when I try to use it with:
> SELECT new_transaction_fn(9, 444, 4, 'B', now(), 'C');
> is:
> NOTICE: Error occurred while executing PL/pgSQL function new_transaction_fn
> NOTICE: line 11 at assignment
> ERROR: parser: parse error at or near "SELECT"
I'm not seeing the problem either. Try turning on debug_print_query
and running the function; then look in the postmaster log to see exactly
what got fed down to the main SQL engine by plpgsql. This might shed
some light.
regards, tom lane