BUG #4698: psql.exe is exits reporting "out of memory" error

Поиск
Список
Период
Сортировка
От Yuri Cherio
Тема BUG #4698: psql.exe is exits reporting "out of memory" error
Дата
Msg-id 200903101813.n2AIDCtq099974@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #4698: psql.exe is exits reporting "out of memory" error
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      4698
Logged by:          Yuri Cherio
Email address:      yuri@aergo.com
PostgreSQL version: 8.3.5-2
Operating system:   Windows XP Pro, SP3
Description:        psql.exe is exits reporting "out of memory" error
Details:

I have SELECT statement result of which I need to dump into a file. Before
dumping it I do line-by-line formatting. The command line looks like this:

psql -f "filename.sql" | sed '<formatting>' > "out_file_name"

Whenever the result set is large (hundreds of thousands of rows) the command
fails and the "out_file_name" size is zero. Simplified command (see below)
has absolutely same behavior:

psql -f "filename.sql" > "out_file_name"

One would expect that standard output should not be accumulated until it
blows up but instead would behave as a stream.

I didn't try this on linux, but it is happening in Windows.

P.S. The same can be achieved with COPY command, however conceptually
speaking the problem of not streaming the result properly still exists.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Teodor Sigaev
Дата:
Сообщение: Re: BUG #4697: to_tsvector hangs on input
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #4698: psql.exe is exits reporting "out of memory" error