Re: psql -e

From: nolan(at)celery(dot)tssi(dot)com
To: tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane)
Cc: mallah(at)trade-india(dot)com (Rajesh Kumar Mallah), peter_e(at)gmx(dot)net (Peter Eisentraut), pgsql-general(at)postgresql(dot)org
Subject: Re: psql -e
Date: 2003-07-24 15:33:55
Message-ID: 20030724153355.10715.qmail@celery.tssi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> I think throwing in another fflush or two would count as a bug fix.
> Anything more extensive probably has to wait for the 7.5 cycle.

Dealing with readline makes it slightly more complicated than that,
because there is an intermingling issue with two independent output
streams.

In addition to a couple of well-placed fflush's, my hack around the
intermingling problem (which apparently only shows up when using the \o
option) was to throw a sleep(1) in before it sends the prompt
and queries the next line from the terminal, to give things a chance
to finish, but I don't know if that is a production-quality fix.
(I did find a couple of other examples in the code of a sleep() thrown
in apparently to resolve timing issues.)

I can take out the code I added to echo the command to the \o stream,
since that is a feature that I would probably want to amplify upon anyway.

If the team would accept the rest as a bugfix, I can send it. Otherwise,
I'll wait for 7.5 and see if I can change the whole output section to
eliminate the problem completely.
--
Mike Nolan

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thien-Thi Nguyen 2003-07-24 15:34:20 Re: quoting of array elements + sexp_out?
Previous Message Dennis Gearon 2003-07-24 15:32:44 Re: SAP DB: The unsung Open Source DB