Usage with pgxpool #148
-
Is it possible to use this with pgxpool from the pgx library? I'm currently using https://github.com/exaring/otelpgx to get traces & metrics from pgxpool, and this pkg for my other database connections. But if I could consolidate dependencies and just use this one that would be great. I see some issues related to pgx, but haven't seen anything related to pgxpool. Just figured I would ask before going down a rabbit hole of trying to figure out if it works. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Per pgx's documents, it includes an adapter for the standard But |
Beta Was this translation helpful? Give feedback.
-
Is there an example on how one might configure this? For example, many code bases would have something like: pool, err := pgxpool.NewWithConfig(ctx, config)
if err != nil {
return nil, err
} Which returns a EDIT: Ahh, I think I missed your point, the idea is we'd convert the
|
Beta Was this translation helpful? Give feedback.
Per pgx's documents, it includes an adapter for the standard
database/sql interface
. So, it is possible to use this withpgx
.But
pgx
also mentions some features are unavailable withdashbase/sql
. https://github.com/jackc/pgx#choosing-between-the-pgx-and-databasesql-interfaces. So, I guess whether to use this library depends on your use cases of thepgx
.