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
* Add pure-sql comparison run to integration
* rework sql to be a bit cleaner, one query per file
* working sql suite, fully specified DSNs with gssenc disabled
* CI rework
* each integration in its own run
* revert to shared suite, distributing artifacts is colossally slow
* stub GSSEnc for psycopg
* try draining and fixing out of sync errors
* more draining
* move python to restart the server before run, tweak logic change around errored connections
* revert ensure_in_sync changes
* ok I guess we dont get to keep it running
This directory hosts the pure-SQL regression harness used to ensure PgDog matches the behaviour of direct PostgreSQL connections.
4
+
5
+
## Layout
6
+
7
+
-`cases/` – numbered SQL scenarios using the `00x_slug_(setup|case|teardown).sql` convention.
8
+
-`global_setup.sql` / `global_teardown.sql` – optional hooks that run before/after every case.
9
+
-`lib.py` – harness logic plus in-code definitions for the six comparison targets (DSNs disable GSS encryption so PgDog can proxy them).
10
+
-`run.sh` / `dev.sh` – integration entrypoints matching the other language suites.
11
+
-`test_sql_regression.py` – pytest runner that executes every case against all registered targets.
12
+
13
+
## Workflow
14
+
15
+
1.`run.sh` builds PgDog, starts the proxy, runs the suite, then shuts PgDog down.
16
+
2. For each scenario the harness:
17
+
- runs `global_setup.sql` (if present) and the scenario’s `*_setup.sql` through every distinct DSN used by the targets (shared once for baseline/pgdog, once for the sharded pool),
18
+
- executes the `*_case.sql` statements against all six variants (baseline Postgres, PgDog, PgDog sharded × text/binary),
19
+
- asserts that statement status, column names, column types, row counts, and row payloads are identical for every target,
20
+
- runs the scenario’s `*_teardown.sql` and then `global_teardown.sql` (if present) across the same DSNs to leave databases clean.
21
+
22
+
Add more scenarios by dropping files into `cases/`:
23
+
24
+
```
25
+
cases/
26
+
002_select_edge_case_setup.sql # optional
27
+
002_select_edge_case_case.sql # required
28
+
002_select_edge_case_teardown.sql # optional
29
+
```
30
+
31
+
Metadata lives in SQL comments at the top of the `*_case.sql` file:
Tags are informative only. Use `skip-targets` to drop one or more target names, or `only-targets` to pin a case to a specific subset (order-sensitive). Set `transactional: false` when the statements must commit.
0 commit comments