Обсуждение: Extension make installcheck: include update/insert feedback?
Hello,
I have a custom extension that uses the usual REGRESS Makefile variable
to indicate files in {sql,expected} that should be used when you say
`make installcheck`.
I've noticed that if my test code does an INSERT or DELETE, the usual
`INSERT 0 1` and `UPDATE 2` messages don't appear in the *.out files,
even though those otherwise mirror psql. I thought maybe there was some
psql switch that turns those on/off, but I couldn't find one. I'd like
to include those messages in my expected/*.out files though, so that my
tests verify I'm adding/updating as many rows as I intend. Is there any
way to do that?
Thanks,
--
Paul ~{:-)
pj@illuminatedcomputing.com
Paul Jungwirth <pj@illuminatedcomputing.com> writes:
> I've noticed that if my test code does an INSERT or DELETE, the usual
> `INSERT 0 1` and `UPDATE 2` messages don't appear in the *.out files,
> even though those otherwise mirror psql. I thought maybe there was some
> psql switch that turns those on/off, but I couldn't find one.
That's because pg_regress launches psql with the -q option (as well as -a).
I think you might be able to override that within a particular test script
by fooling with QUIET, or whichever psql variable it is that that switch
sets.
regards, tom lane