Re: psql does not save contents into file at end of command.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Rajesh Kumar Mallah" <mallah(dot)rajesh(at)gmail(dot)com>
Cc: "Lista Postgres" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: psql does not save contents into file at end of command.
Date: 2006-12-27 16:27:06
Message-ID: 17970.1167236826@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Rajesh Kumar Mallah" <mallah(dot)rajesh(at)gmail(dot)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; 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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Negandhi, Nishith 2006-12-27 16:41:22 Importing from excelinto PostgreSQL
Previous Message Bricklen Anderson 2006-12-27 16:17:12 Re: Dump and Query