Submission Review: User control over psql error stream

From: Alastair Turner <bell(at)ctrlf5(dot)co(dot)za>
To: "Karl O(dot) Pinc" <kop(at)meme(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Submission Review: User control over psql error stream
Date: 2012-12-09 20:13:32
Message-ID: CAFgq2fVX7rY9f1rrU01_fNRUYt=fq4du9D_PPVjqHGGLmrcZNA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kohei KaiGai 2012-12-09 20:19:20 Re: Review of Row Level Security
Previous Message Noah Misch 2012-12-09 20:06:14 Re: Commits 8de72b and 5457a1 (COPY FREEZE)