From 198b3716dba68544b55cb97bd120738a86d5df2d Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Tue, 30 Mar 2021 20:12:34 -0300 Subject: Improve PQtrace() output format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Transform the PQtrace output format from its ancient (and mostly useless) byte-level output format to a logical-message-level output, making it much more usable. This implementation allows the printing code to be written (as it indeed was) by looking at the protocol documentation, which gives more confidence that the three (docs, trace code and actual code) actually match. Author: 岩田 彩 (Aya Iwata) Reviewed-by: 綱川 貴之 (Takayuki Tsunakawa) Reviewed-by: Kirk Jamison Reviewed-by: Kyotaro Horiguchi Reviewed-by: Tom Lane Reviewed-by: 黒田 隼人 (Hayato Kuroda) Reviewed-by: "Nagaura, Ryohei" Reviewed-by: Ryo Matsumura Reviewed-by: Greg Nancarrow Reviewed-by: Jim Doty Reviewed-by: Álvaro Herrera Discussion: https://postgr.es/m/71E660EB361DF14299875B198D4CE5423DE3FBA4@g01jpexmbkw25 --- src/interfaces/libpq/fe-connect.c | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'src/interfaces/libpq/fe-connect.c') diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index 53b354abb28..a90bdb8ab6d 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -6859,27 +6859,6 @@ PQsetErrorContextVisibility(PGconn *conn, PGContextVisibility show_context) return old; } -void -PQtrace(PGconn *conn, FILE *debug_port) -{ - if (conn == NULL) - return; - PQuntrace(conn); - conn->Pfdebug = debug_port; -} - -void -PQuntrace(PGconn *conn) -{ - if (conn == NULL) - return; - if (conn->Pfdebug) - { - fflush(conn->Pfdebug); - conn->Pfdebug = NULL; - } -} - PQnoticeReceiver PQsetNoticeReceiver(PGconn *conn, PQnoticeReceiver proc, void *arg) { -- cgit v1.2.3