Submission Review: User control over psql error stream - Mailing list pgsql-hackers

From Alastair Turner
Subject Submission Review: User control over psql error stream
Date
Msg-id CAFgq2fVX7rY9f1rrU01_fNRUYt=fq4du9D_PPVjqHGGLmrcZNA@mail.gmail.com
Whole thread Raw
Responses Re: Submission Review: User control over psql error stream  ("Karl O. Pinc" <kop@meme.com>)
List pgsql-hackers
Hi Karl,

I have given the patch a quick review and read the related mails
following its initial submission.

I agree with that functionality along these lines is desirable. The
ability to manage output from within psql at least as richly as is
possible with shell redirection - and change it between commands
because it is accessible from with psql - would be great.

The basics of the review were fine: the patch applied with minimal
fuzz and compiled cleanly.

The implementation of the functionality - as built for your specific
requirement - concerns me in a few ways though:

- It's closed ended - there are three things about error output which
affect where it's written to: does it go to query output, does it go
somewhere else (a file or pipe), does it get displayed as well as
going to the other destination. The patch addresses the first and
third questions without making allowance for asking or dealing with
second one. Internally I think this should be two bools rather than a
custom tri-state, mainly because this would allow the addition of the
error file option (in another patch, when the time came) with minimum
intrusion.

- \pset is not the right place for this switch - all the documentation
(including \?) indicate that psets are for controlling the display of
result tables and this doesn't fit with the other options to \pset.
Since this affects what goes into the output file I would think that
this should be an option to \o. Maybe \o& ?

Marked "Returned to Author".

Regards,
Alastair.



pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: Commits 8de72b and 5457a1 (COPY FREEZE)
Next
From: Kohei KaiGai
Date:
Subject: Re: Review of Row Level Security