Peter Eisentraut <peter_e(at)gmx(dot)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