Replies: 1 comment
-
Direct usage of prepared statements on a You can manually use prepared statements with a However, by default pgx automatically prepares statements and keeps a cache of statements. So the recommendation is that unless you have a very particular or unusual use case that you don't manually do any prepared statements. If for some reason you really did need to ensure prepared statements were used and you had to use |
Beta Was this translation helpful? Give feedback.
-
pgxpool.Pool
has anExec
method, but notExecPrepared
. TheExecPrepared
method is only defined on apgconn.PgConn
, but the doc for retreiving it viapgxpool.Conn.PgConn()
says that it's an escape hatch method, making it sound like its usage is discouraged.I don't know if there is a technical reason why prepared statements shouldn't or cannot be used on a connection pool, or if I am just misunderstanding the intended usage?
Beta Was this translation helpful? Give feedback.
All reactions