Start with the problem

Listing your plants should never return someone else’s. I used to add WHERE user_id = $1 to each query. With row-level security, Postgres can apply the ownership rule even when the query doesn’t repeat it.