Re: SPI error with non-volatile functions - Mailing list pgsql-hackers

From Andres Freund
Subject Re: SPI error with non-volatile functions
Date
Msg-id 20191113051359.yxypcactwnz7uj3q@alap3.anarazel.de
Whole thread Raw
In response to SPI error with non-volatile functions  (Tom Mercha <mercha_t@hotmail.com>)
Responses Re: SPI error with non-volatile functions  (Tom Mercha <mercha_t@hotmail.com>)
List pgsql-hackers
Hi,

On 2019-11-13 05:09:31 +0000, Tom Mercha wrote:
> I've been using SPI to execute some queries and this time I've tried to 
> issue CREATE TABLE commands through SPI. I've been getting the message 
> "ERROR: CREATE TABLE AS is not allowed in a non-volatile function".

Any chance you're specifying read_only = true to
SPI_execute()/execute_plan()/...?

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Tom Mercha
Date:
Subject: SPI error with non-volatile functions
Next
From: Michael Paquier
Date:
Subject: Re: [PATCH] Do not use StdRdOptions in Access Methods