diff --git a/lib/postgrex/protocol.ex b/lib/postgrex/protocol.ex index 3afcf902..f446d93e 100644 --- a/lib/postgrex/protocol.ex +++ b/lib/postgrex/protocol.ex @@ -403,6 +403,7 @@ defmodule Postgrex.Protocol do | {:disconnect, %DBConnection.ConnectionError{}, state} def handle_execute(%Query{} = query, params, opts, s) do comment = Keyword.get(opts, :comment) + validate_comment(query.comment, s) query = %{query | comment: comment} case Keyword.get(opts, :postgrex_copy, false) do