You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using pghistory.context, variables are inject into the SQL, meaning an additional SQL statement to set variables is prepending before every SQL statement.
The rationale of this original approach was to avoid any extra surprise queries at all costs, especially for users with poor DB latencies. On the other hand, SQL is now prepended with a statement to set a variable, which fills the SQL log and also does add an overhead to every statement (albeit largely negligible)
I'm planning to spin out the SQL injection and variable setting logic into its own library since this approach is used by other libraries. I will make the variable injection configurable in this library, meaning users of pghistory will be able to configure how context (and other variables) are set
The text was updated successfully, but these errors were encountered:
When using
pghistory.context
, variables are inject into the SQL, meaning an additional SQL statement to set variables is prepending before every SQL statement.The rationale of this original approach was to avoid any extra surprise queries at all costs, especially for users with poor DB latencies. On the other hand, SQL is now prepended with a statement to set a variable, which fills the SQL log and also does add an overhead to every statement (albeit largely negligible)
I'm planning to spin out the SQL injection and variable setting logic into its own library since this approach is used by other libraries. I will make the variable injection configurable in this library, meaning users of pghistory will be able to configure how context (and other variables) are set
The text was updated successfully, but these errors were encountered: