How to disable the logging of parameter values in PostgreSQL
You can set log_error_verbosity = TERSE

The manual:


  Controls the amount of detail written in the server log for each
  message that is logged. Valid values are TERSE, DEFAULT, and VERBOSE,
  each adding more fields to displayed messages. TERSE excludes the
  logging of DETAIL, HINT, QUERY, and CONTEXT error information.


Bold emphasis mine.