Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 611159FA492 for ; Wed, 27 Dec 2006 13:47:51 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 59356-02 for ; Wed, 27 Dec 2006 13:47:43 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.178]) by postgresql.org (Postfix) with ESMTP id AD0379F93A2 for ; Wed, 27 Dec 2006 13:47:44 -0400 (AST) Received: by py-out-1112.google.com with SMTP id a73so1303889pye for ; Wed, 27 Dec 2006 09:47:43 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=GGkqq+BPpeyRJ9kNtTwEWwe+3U3eyhy+o4+Y9iEpqZvvb5eh9EgAkNCDl81ODGiwjfS6+O1pwI57snOcihzEltCuMwUCENHoGDTtuUlbZqkGkSaftRNkeAgL6SOXri+sS68t5vzBB3yp8tqME70LPpVZzWvEWjNZNFgO0v40lCA= Received: by 10.35.115.18 with SMTP id s18mr26971866pym.1167241663963; Wed, 27 Dec 2006 09:47:43 -0800 (PST) Received: by 10.35.80.4 with HTTP; Wed, 27 Dec 2006 09:47:43 -0800 (PST) Message-ID: Date: Wed, 27 Dec 2006 23:17:43 +0530 From: "Rajesh Kumar Mallah" To: "Tom Lane" Subject: Re: psql does not save contents into file at end of command. Cc: "Lista Postgres" In-Reply-To: <17970.1167236826@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_30442_22414506.1167241663927" References: <17970.1167236826@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/340 X-Sequence-Number: 24132 ------=_Part_30442_22414506.1167241663927 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 12/27/06, Tom Lane wrote: > > "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; i see . I did not investigate to that extent , i thought it was for all. 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. Thanks for the notice and belated Merry Christmas. Regds mallah. regards, tom lane > ------=_Part_30442_22414506.1167241663927 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline

On 12/27/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"Rajesh Kumar Mallah" <mallah.rajesh@gmail.com> 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;

i see . I did not investigate to that extent , i thought it was for all.

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.

Thanks for the notice
and belated Merry Christmas.

Regds
mallah.

                        regards, tom lane

------=_Part_30442_22414506.1167241663927--