Re: select * and save into a text file failed

From: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
To: "Lee Wu" <Lwu(at)mxlogic(dot)com>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: select * and save into a text file failed
Date: 2005-06-10 16:59:36
Message-ID: 200506100959.37249.scrawford@pinpointresearch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Friday 10 June 2005 9:33 am, Lee Wu wrote:
> Even without saving to file, it is still killed:
>...
> My_db=# select * from a_table;
> Killed
>...

The previous examples don't work for me. In psql try this:
--First set the output to a file
\o 'my_output.txt'

--Now run the query
select * from myfile;

--Quit and check your results
\q

If you have a very large table you can exhaust memory on the client
side unless you are writing the data directly to a file.

Cheers,
Steve

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Lee Wu 2005-06-10 17:03:56 Re: select * and save into a text file failed
Previous Message Tom Lane 2005-06-10 16:57:59 Re: Indexes getting corrupted.