Re: psql -e - Mailing list pgsql-general

From Tom Lane
Subject Re: psql -e
Date
Msg-id 17838.1059054818@sss.pgh.pa.us
Whole thread Raw
In response to Re: psql -e  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: psql -e  (Martijn van Oosterhout <kleptog@svana.org>)
Re: psql -e  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-general
Peter Eisentraut <peter_e@gmx.net> writes:
> Rajesh Kumar Mallah writes:
>> The echo feature of psql echos the query after its executed.
>> does it makes more sense to have the reverse.

> The query is printed *before* it is executed, but you might not see it
> because your terminal is not flushing the stdout at the right times.

It might be a good idea to do an explicit fflush(stdout) right after
printing the query.  I observe that PSQLexec() does this, and SendQuery
does too in one path --- but not in the other.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: SAP DB: The unsung Open Source DB
Next
From: Richard Huxton
Date:
Subject: Re: List last value of all sequences