cannot execute DELETE in a read-only transaction
Hi, I'm trying to delete an entry through a database function when the user calls this function, but I always get this error.
I already checked
select pg_is_in_recovery();
and show default_transaction_read_only;
.
I also tried to set set transaction read write;
but then I'll get this error: set transaction read write;
.
Please help4 Replies
Please show your code and the full error.
React:
DB Function (with plv8):
Friends Table
@NanoBit
Sorry. I’m not so sure about plv8 as I have not used it before.
You could also list the full function, whether it’s security definer or invoked etc
no worries, i think I got it to work by creating the function through the terminal