pgsql: Improve PQtrace() output format

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Improve PQtrace() output format
Date: 2021-03-30 23:17:29
Message-ID: E1lRNc1-0004Bd-RW@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Improve PQtrace() output format

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) <iwata(dot)aya(at)fujitsu(dot)com>
Reviewed-by: 綱川 貴之 (Takayuki Tsunakawa) <tsunakawa(dot)takay(at)fujitsu(dot)com>
Reviewed-by: Kirk Jamison <k(dot)jamison(at)fujitsu(dot)com>
Reviewed-by: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Reviewed-by: 黒田 隼人 (Hayato Kuroda) <kuroda(dot)hayato(at)fujitsu(dot)com>
Reviewed-by: "Nagaura, Ryohei" <nagaura(dot)ryohei(at)jp(dot)fujitsu(dot)com>
Reviewed-by: Ryo Matsumura <matsumura(dot)ryo(at)fujitsu(dot)com>
Reviewed-by: Greg Nancarrow <gregn4422(at)gmail(dot)com>
Reviewed-by: Jim Doty <jdoty(at)pivotal(dot)io>
Reviewed-by: Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Discussion: https://postgr.es/m/71E660EB361DF14299875B198D4CE5423DE3FBA4@g01jpexmbkw25

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/198b3716dba68544b55cb97bd120738a86d5df2d

Modified Files
--------------
doc/src/sgml/libpq.sgml | 42 ++-
src/interfaces/libpq/Makefile | 1 +
src/interfaces/libpq/exports.txt | 1 +
src/interfaces/libpq/fe-connect.c | 21 --
src/interfaces/libpq/fe-exec.c | 4 -
src/interfaces/libpq/fe-misc.c | 66 +---
src/interfaces/libpq/fe-protocol3.c | 13 +
src/interfaces/libpq/fe-trace.c | 714 ++++++++++++++++++++++++++++++++++++
src/interfaces/libpq/libpq-fe.h | 17 +-
src/interfaces/libpq/libpq-int.h | 7 +
10 files changed, 804 insertions(+), 82 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2021-03-30 23:20:32 Re: pgsql: In messages, use singular nouns for -1, like we do for +1.
Previous Message Alvaro Herrera 2021-03-30 23:15:06 Re: pgsql: In messages, use singular nouns for -1, like we do for +1.