Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 9A9DF9FA311 for ; Wed, 27 Dec 2006 12:27:34 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 21402-02 for ; Wed, 27 Dec 2006 12:27:10 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id DC1FD9F93A2 for ; Wed, 27 Dec 2006 12:27:09 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id kBRGR634017971; Wed, 27 Dec 2006 11:27:06 -0500 (EST) To: "Rajesh Kumar Mallah" cc: "Lista Postgres" Subject: Re: psql does not save contents into file at end of command. In-reply-to: References: Comments: In-reply-to "Rajesh Kumar Mallah" message dated "Sun, 24 Dec 2006 15:48:27 +0530" Date: Wed, 27 Dec 2006 11:27:06 -0500 Message-ID: <17970.1167236826@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/336 X-Sequence-Number: 24128 "Rajesh Kumar Mallah" writes: > tradein_clients=> \o db.lst > tradein_clients=> \l (till this point, there is nothing in file db.lst) > tradein_clients=> \q (now it saves) (also saves if another \o is issued) > Dunno till what extent this behavior is justified. I wasn't too excited about this, but on investigation, psql *does* fflush() the \o file after each ordinary SQL command; it's only backslash command output that doesn't necessarily reach the file immediately. This is inconsistent ... if we're going to do it for regular commands seems like we should do it for backslash commands too. regards, tom lane