Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

django-pghistory makes SQL queries preview hard to tell apart #29

Open
gregtap opened this issue Sep 23, 2022 · 0 comments
Open

django-pghistory makes SQL queries preview hard to tell apart #29

gregtap opened this issue Sep 23, 2022 · 0 comments

Comments

@gregtap
Copy link

gregtap commented Sep 23, 2022

kolo = "^2.0.3"

When using Django pghistory all SQL queries are wrapped in a transaction starting with SET LOCAL pghistory.context_id. This makes all queries impossible to tell apart from the preview list.

Not sure if there is something we could hook on to clean up / display the displayed preview?

SET
  LOCAL pghistory.context_id = '04ca026f-4b5d-48e2-acac-439bcdb953db';
SET
  LOCAL pghistory.context_metadata = '{"user": 25, "url": "/team/"}';
SELECT
  "client"."created",
  "client"."modified",
  "client"."uuid",
  "client"."company_id",
  "client"."symbol",
  "client"."gocardless_user_id",
  "client"."gocardless_user_secondary_id",
  "client"."mooncard_user_id",
  "client"."revenue_default_source",
  "client"."revenue_default_category",
  "client"."requesting_funding_increase",
  "client"."last4_iban",
  "client"."contract_link"
FROM
  "client"
WHERE
  "client"."company_id" = 'iw2piqsWAbPnyJSRFXmKMy'
LIMIT
  21

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant