mirror of
https://github.com/archtechx/tenancy.git
synced 2026-08-06 05:54:03 +00:00
perf(rls): wrap current_setting() in the generated tenant policy for per-statement eval
This commit is contained in:
parent
945c582b17
commit
7a1a2162ac
1 changed files with 1 additions and 1 deletions
|
|
@ -528,7 +528,7 @@ class TableRLSManager implements RLSPolicyManager
|
|||
|
||||
if ($table === tenancy()->model()->getTable()) {
|
||||
// Convert tenant key to text to match the session variable type
|
||||
$query .= "{$column}::text = current_setting('{$sessionTenantKey}')\n";
|
||||
$query .= "{$column}::text = (select current_setting('{$sessionTenantKey}'))\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue