Re: log bind parameter values on error - Mailing list pgsql-hackers

From Alexey Bashtanov
Subject Re: log bind parameter values on error
Date
Msg-id f224aceb-a200-ea02-cbdf-3f052398f5d7@imap.cc
Whole thread Raw
In response to Re: log bind parameter values on error  (Alexey Bashtanov <bashtanov@imap.cc>)
Responses Re: log bind parameter values on error  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Please find the rebased patch attached.

Tested like the following.
Provided you're in the postgres checkout and you've run make in 
src/test/examples/ and connected to db=postgres:

CREATE SCHEMA testlibpq3;
SET search_path = testlibpq3;
CREATE TABLE test1_(i int4, t text, b bytea);
INSERT INTO test1_ VALUES(0, '', '');
CREATE VIEW test1 AS SELECT 1/i i, t, b FROM test1_;

-- will log only statement
\! ./src/test/examples/testlibpq3

ALTER SYSTEM SET log_parameters_on_error TO on;
SELECT pg_reload_conf();

-- will log statement with parameters
\! ./src/test/examples/testlibpq3

Best regards,
   Alexey

Attachment

pgsql-hackers by date:

Previous
From: Raúl Marín Rodríguez
Date:
Subject: Re: Fix runtime errors from -fsanitize=undefined
Next
From: Tom Lane
Date:
Subject: Re: [PATCH v4] Add \warn to psql