"Evgeni" <evgeni117(at)mail(dot)ru> writes:
> On SPI_exec see erorr ERROR: INSERT is not allowed in a non-volatile
> function
You didn't show us your code, but somehow or other you're managing to
pass read_only = true to the SPI execution code.
regards, tom lane