Re: ORAFCE -> UTL_FILE -> pul_line - Mailing list pgsql-general

From Pavel Stehule
Subject Re: ORAFCE -> UTL_FILE -> pul_line
Date
Msg-id CAFj8pRC0QKbiqPaAH+SBU_epVvEngiw9gpibx-A495NJNL+8Wg@mail.gmail.com
Whole thread Raw
In response to ORAFCE -> UTL_FILE -> pul_line  (bj77 <jovino_blanco@hotmail.com>)
List pgsql-general
Hello

2012/1/13 bj77 <jovino_blanco@hotmail.com>:
> Hi,
>
> OS: SUSE LINUX
>
> I am writing a logfile (batch process) with the ORAFCE utilities of
> UTL_FILE.
> I recently observed that the logfile is not refreshed after every new entry
> written. It appears to me that the every 4096 bytes of data are written at
> the same time.
>

It doesn't flush after any write. Filebuffers are flushed when file is
closed or when function fflush is explicitly called.

Use utl_file.fflush(file utl_file.file_type)  after write, and then
your logfile will be fresh every time.

Regards

Pavel Stehule


> Can anyone explain me this please? And is it possible to change that in
> order to write every line directly into a file (being able to see the
> current file input with putty or WINSCP)?
>
> Sorry for my english, i hope you did understand my question.
>
> Thanks a lot in advance!
>
> Saludos
>
> --
> View this message in context: http://postgresql.1045698.n5.nabble.com/ORAFCE-UTL-FILE-pul-line-tp5142399p5142399.html
> Sent from the PostgreSQL - general mailing list archive at Nabble.com.
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: seiliki@so-net.net.tw
Date:
Subject: Re: unnest array of row type
Next
From: Reid Thompson
Date:
Subject: PG9.1.2 -- 3 day old orphaned/non-responsive query -- pg_(cancel)(terminate)_backend has no effect