From 0570b0e196d3449b8c85492a320d8f6ee931743e Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Sat, 11 Nov 2023 09:22:32 -0600 Subject: [PATCH] Better document PgConn.Prepare implementation --- pgconn/pgconn.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pgconn/pgconn.go b/pgconn/pgconn.go index 4ed90def..ceb1b137 100644 --- a/pgconn/pgconn.go +++ b/pgconn/pgconn.go @@ -813,6 +813,9 @@ type StatementDescription struct { // Prepare creates a prepared statement. If the name is empty, the anonymous prepared statement will be used. This // allows Prepare to also to describe statements without creating a server-side prepared statement. +// +// Prepare does not send a PREPARE statement to the server. It uses the PostgreSQL Parse and Describe protocol messages +// directly. func (pgConn *PgConn) Prepare(ctx context.Context, name, sql string, paramOIDs []uint32) (*StatementDescription, error) { if err := pgConn.lock(); err != nil { return nil, err