"new row violates row-level security policy" error for every insert
call
#31
Answered
by
jan-tennert
TheOnlyTails
asked this question in
Q&A
-
I have this client.postgrest["scores"].insert(
User(it.author.name, discordId = it.author.idLong),
upsert = true,
).decodeAs<User>() but every time I send to trigger it, I get this error message:
|
Beta Was this translation helpful? Give feedback.
Answered by
jan-tennert
Nov 25, 2022
Replies: 1 comment 5 replies
-
It might be that you only have access to inserting in the table but not selecting, so try to set the returning parameter to minimal (which won't return the changed row when calling decodeAs) or change the rls policy. But it seems like you want to receive the updated data so you probably have to look in your policies |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
TheOnlyTails
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It might be that you only have access to inserting in the table but not selecting, so try to set the returning parameter to minimal (which won't return the changed row when calling decodeAs) or change the rls policy. But it seems like you want to receive the updated data so you probably have to look in your policies