The following bug has been logged online: Bug reference: 4698 Logged by: Yuri Cherio Email address: y...@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. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs