pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
Subject: [PATCH v7 2/6] Allow tracefile to be stdout
Date: Tue, 21 Jun 2022 19:55:12 +0200

---
 src/test/modules/libpq_pipeline/libpq_pipeline.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

inline patch 1: src/test/modules/libpq_pipeline/libpq_pipeline.c (+4/-1 lines) download inline-1.patchdiff --git a/src/test/modules/libpq_pipeline/libpq_pipeline.c b/src/test/modules/libpq_pipeline/libpq_pipeline.c index c27c4e0ada..8f6f2d4b4b 100644 --- a/src/test/modules/libpq_pipeline/libpq_pipeline.c +++ b/src/test/modules/libpq_pipeline/libpq_pipeline.c @@ -1630,7 +1630,10 @@ main(int argc, char **argv) /* Set the trace file, if requested */ if (tracefile != NULL) { - trace = fopen(tracefile, "w"); + if (strcmp(tracefile, "-") == 0) + trace = stdout; + else + trace = fopen(tracefile, "w"); if (trace == NULL) pg_fatal("could not open file \"%s\": %m", tracefile); -- 2.30.2
--c6botfw447u3lelj Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v7-0003-if-the-queue-becomes-empty-reset-the-tail-too.patch"

Message-ID: <no-message-id-29938@localhost>
Permalink:  ../no-message-id-29938@localhost/
Also on:    postgresql.org/message-id/no-message-id-29938@localhost

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: alvherre@alvh.no-ip.org
  Subject: Re: [PATCH v7 2/6] Allow tracefile to be stdout
  In-Reply-To: <no-message-id-29938@localhost>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox