numerus/pkg
jordi fita mas ab6c0079c9 Set search_path on each new connection, and role on each acquisition
The whole application will need the same search_path, so it is wasteful
to do that in each handler.

It is possible to pass the search path as a parameter to the database’s
connection string, but then everyone would need to remember to do that,
and update the configuration in case i add another schema.

Similarly, i need to change the user’s role to match her
permissions—which are not in yet—, but this time i need it each time a
handler requests a connection from the pool, because each time the
connection is returned to the pool i reset the role back to the initial,
that hopefully will be authenticator.
2023-01-17 14:49:02 +01:00
..
db.go Set search_path on each new connection, and role on each acquisition 2023-01-17 14:49:02 +01:00
logger.go Move source file to the root of pkg 2023-01-17 10:40:22 +01:00
router.go Set search_path on each new connection, and role on each acquisition 2023-01-17 14:49:02 +01:00