Each Casbin policy rule is inserted into DB separatedly with an insert into, which causes the performance downgrade. Can you fix it by inserting all policy rules in one statement? Thanks.
It looks like this was "fixed" in 9892155, with the side-effect of adding potential SQL injection. Please can this change be reverted so that this adapter is safe to use again.
A user complained in Twitter that the performance of saving policy to PostgreSQL is poor. See the below code: https://github.com/going/casbin-postgres-adapter/blob/3a172af64a29a2f4ed8a01d980b00ee06f63143c/adapter.go#L162-L191
Each Casbin policy rule is inserted into DB separatedly with an
insert into
, which causes the performance downgrade. Can you fix it by inserting all policy rules in one statement? Thanks.