Hi,
Finally I found the cause of the problem.
I found deeper inside my calls, a function which has to return an integer
column from a RECORD rec variable. The rec is assigned with the following
statement:
EXECUTE 'SELECT pk AS "PK" FROM "my_table" WHERE my_where_clause'
INTO rec.
When my_where_clause is not fulfilled, rec is initialized somehow with null.
The exception is rised at the end where I call:
RETURN rec."PK"
Maybe someone can explain this behavior.
TIA,
Sabin