Re: psql -e

Поиск
Список
Период
Сортировка
От nolan@celery.tssi.com
Тема Re: psql -e
Дата
Msg-id 20030724153355.10715.qmail@celery.tssi.com
обсуждение исходный текст
Ответ на Re: psql -e  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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

В списке pgsql-general по дате отправления:

Предыдущее
От: Thien-Thi Nguyen
Дата:
Сообщение: Re: quoting of array elements + sexp_out?
Следующее
От: Dennis Gearon
Дата:
Сообщение: Re: SAP DB: The unsung Open Source DB