Re: [patch] \g with multiple result sets and \watch with copy queries - Mailing list pgsql-hackers

From Daniel Verite
Subject Re: [patch] \g with multiple result sets and \watch with copy queries
Date
Msg-id 38680033-f9b7-4c7d-a729-8487e8e51308@manitou-mail.org
Whole thread Raw
In response to Re: [patch] \g with multiple result sets and \watch with copy queries  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [patch] \g with multiple result sets and \watch with copy queries
List pgsql-hackers
    Tom Lane wrote:

> > Currently, test/regress/sql/psql.sql doesn't AFAICS write anything
> > outside of stdout, but \g, \o, \copy need  to write to external
> > files to be tested properly.
>
> Yeah, I don't think we can usefully test these in psql.sql, because
> file-system side effects are bad in that context.  But maybe a TAP
> test could cope?

I've came up with the attached using psql.sql only, at least for
\g and \o writing to files.
This is a bit more complicated than the usual tests, but not
that much.
Any opinions on this?


Best regards,
--
Daniel Vérité
https://postgresql.verite.pro/
Twitter: @DanielVerite

Attachment

pgsql-hackers by date:

Previous
From: Denis Laxalde
Date:
Subject: [PATCH] Reset single-row processing mode at end of pipeline commands queue
Next
From: Fujii Masao
Date:
Subject: Re: ps command does not show walsender's connected db