Re: Making psql error out on output failures

From: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
To: "David Zhang" <david(dot)zhang(at)highgo(dot)ca>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Making psql error out on output failures
Date: 2020-01-20 10:42:05
Message-ID: 0538c122-9597-4f12-a920-0bb2fc3119c8@manitou-mail.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David Zhang wrote:

> Yes, I agree with you. For case 2 "select repeat('111', 1000000) \g
> /mnt/ramdisk/file", it can be easily fixed with more accurate error
> message similar to pg_dump, one example could be something like below.
> But for case 1 "psql -d postgres -At -c "select repeat('111', 1000000)"
> > /mnt/ramdisk/file" , it may require a lot of refactoring work.

I don't quite see why you make that distinction? The relevant bits of
code are common, it's all the code in src/fe_utils/print.c called
from PrintQuery().

Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2020-01-20 12:14:58 Re: Crash in BRIN summarization
Previous Message Dean Rasheed 2020-01-20 10:28:37 Re: Greatest Common Divisor