0cc78b90ae
Support setting a statement timeout
...
To stop queries related to the web server that run for a long time.
2020-04-24 08:59:32 +01:00
8e9f1af89b
Use the config options when creating the default paramstring
2020-04-07 17:37:03 +01:00
b337c5fcb2
Add a function to check if the test database is being used
...
This helps avoid problems when running the tests, and the test database not
being used.
2020-02-24 21:15:43 +00:00
356a5954b2
Add support for using a database URI
...
As this is useful when working with pg_tmp.
2019-10-08 19:45:41 +01:00
1441942200
Hack better NULL support on to (squee)
...
PQgetvalue used by squee returns null values as empty strings, which are
ambiguous for string fields. Therefore, use PQgetisnull to implement a
serialiser for squee which checks empty strings to see if they're actually a
NULL value, then returns '() in this case.
exec-query-with-null-handling can be used to access this behaviour.
2019-09-04 12:52:12 +02:00
fde1000cb3
Add a couple of functions for PostgreSQL advisory locks
...
Use symbol-hash to convert a symbol to the number for the lock. I'm hoping
this is OK, and it seems to be stable.
2019-07-12 19:51:42 +01:00
743cec7cb6
Associate a name with database connections
...
This helps when working out which connection to the database is doing what.
2019-07-12 19:49:26 +01:00
051962b54d
Add a with-postgresql-transaction procedure
...
To help with running tests.
2019-05-05 13:35:17 +01:00
2e45bb0696
Extract out some database functionality to another module
2019-04-14 10:04:51 +01:00