when doing an update to a row how does supabase kn...
# off-topic
a
when doing an update to a row how does supabase know which row to change?
g
You are doing update which requires a filter like .match() operator to specify the row. (upsert() does not need a match as you must provide the primary key)
a
when providing the primary key without RLS it says that I am violating unique-constraints on the primary key
with RLS it seems to be fine for now but its an odd one
g
.update() and .upsert() work differently. Your example code used .update() which also needs a .match()
a
ahh alright that makes sense
I assume the reason it works with the RLS without using .match() is because there is only one entry per user in that table so it can't change anything else so there is no issue on duplicate keys
g
yes
a
alright, thank you so much