Re: Making psql error out on output failures - Mailing list pgsql-hackers

From Daniel Verite
Subject Re: Making psql error out on output failures
Date
Msg-id 0538c122-9597-4f12-a920-0bb2fc3119c8@manitou-mail.org
Whole thread Raw
In response to Re: Making psql error out on output failures  (David Zhang <david.zhang@highgo.ca>)
Responses Re: Making psql error out on output failures  (David Zhang <david.zhang@highgo.ca>)
List 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



pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: Greatest Common Divisor
Next
From: Alvaro Herrera
Date:
Subject: Re: Crash in BRIN summarization