* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> I agree. I wonder if it wouldn't be cleaner to pass the information in
> the other direction, ie, send a boolean down to PrintTocData saying "you
> are sending SQL commands" or "you are sending COPY data". Then, instead
> of depending only on the libpq state to decide what to do in
> ExecuteSqlCommandBuf, we could cross-check: if we're sending SQL data
> and the libpq state is wrong, just discard the line.
I believe the attached patch does this now. Under my test case it
correctly handled things. I'm certainly happier with it this way and
apologize for not realizing this better approach sooner. Please
comment.
Thanks!
Stephen