0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-28 09:16:49 +01:00
Commit Graph

4 Commits

Author SHA1 Message Date
James Greenhill
b7df925186
Revert "Add logging to all postgresql queries with query context (#7486)" (#7512)
This reverts commit 3287c48f53.
2021-12-03 12:07:19 -08:00
Karl-Aksel Puulmann
3287c48f53
Add logging to all postgresql queries with query context (#7486)
* Add logging to all postgresql queries with query context

Uses the exact same pattern as we do currently for clickhouse, just
hooking in there differently

* Support psycopg2.sql.SQL

* Better docs

* update a test
2021-12-02 16:08:26 +02:00
Harry Waye
eb08897cf4
dev(clickhouse): strip out comments before executing sql (#6181)
* dev(clickhouse): strip out comments before executing sql

This is so we can easily copy/paste from e.g. Metabase by querying the
system.query_log. In metabase is doesn't display new lines (although you
can download to file for this), but it's not very practical.

* test(clickhouse): use `capture_select_queries` in comment strip test

* test(clickhouse): only sub. params if non-insert query

This parallels `clickhouse_driver` behaviour.

* chore(clickhouse): move sql preparation to dedicated function

* refactor: rearrange func and type definitions
2021-10-04 08:13:31 +01:00
James Greenhill
7ac64c84f1
Basic caching for Clickhouse to redis (#2300)
* Basic caching for Clickhouse to redis

* Use redis for caching results

* add tests and fix bugs

* fix mypy

* add fakeredis as req

* add fakeredis to github action for testing

* add fakeredis to cloud tests too

* pickle -> json

* bytes

* json in tests

* tuplefy
2020-11-13 13:20:00 +01:00