psql does not save contents into file at end of command.
psql does not save contents into file at end of command.
От:
"Rajesh Kumar Mallah" <mallah.rajesh@gmail.com>
Дата:
Hi,
this is psql8.2 client and server.
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.
regds
mallah.
Re: psql does not save contents into file at end of command.
От:
Alvaro Herrera <alvherre@commandprompt.com>
Дата:
Rajesh Kumar Mallah wrote: > Hi, > > this is psql8.2 client and server. > > 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. Maybe it is writing, just not fflushing? -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.
Re: psql does not save contents into file at end of command.
От:
"Rajesh Kumar Mallah" <mallah.rajesh@gmail.com>
Дата:
>
> Dunno till what extent this behavior is justified.
Maybe it is writing, just not fflushing?
Alvaro,
i am reporting as an enduser. I feel many would consider it buggy.
regds
mallah.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
Re: psql does not save contents into file at end of command.
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"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
Re: psql does not save contents into file at end of command.
От:
"Rajesh Kumar Mallah" <mallah.rajesh@gmail.com>
Дата:
On 12/27/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
i see . I did not investigate to that extent , i thought it was for all.
Thanks for the notice
and belated Merry Christmas.
Regds
mallah.
"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