From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, Rajesh Kumar Mallah <mallah(at)trade-india(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: psql -e |
Date: | 2003-07-28 12:53:48 |
Message-ID: | 20030728125347.GB11778@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hmm, a little late here, but why not just unbuffer stdout, or are there
reasons to preserve some buffering?
On Thu, Jul 24, 2003 at 09:53:38AM -0400, Tom Lane wrote:
> 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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> "All that is needed for the forces of evil to triumph is for enough good
> men to do nothing." - Edmond Burke
> "The penalty good people pay for not being interested in politics is to be
> governed by people worse than themselves." - Plato
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-07-28 13:36:31 | Re: psql -e |
Previous Message | Rich Cullingford | 2003-07-28 12:02:00 |