X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9C04A52953 for ; Fri, 10 Jun 2005 13:55:17 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 82872-05 for ; Fri, 10 Jun 2005 16:55:15 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 16F6452932 for ; Fri, 10 Jun 2005 13:55:12 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j5AGt7DE023617; Fri, 10 Jun 2005 12:55:07 -0400 (EDT) To: "Lee Wu" Cc: pgsql-admin@postgresql.org Subject: Re: select * and save into a text file failed In-reply-to: References: Comments: In-reply-to "Lee Wu" message dated "Fri, 10 Jun 2005 10:33:57 -0600" Date: Fri, 10 Jun 2005 12:55:07 -0400 Message-ID: <23616.1118422507@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/75 X-Sequence-Number: 17830 "Lee Wu" writes: > My_db=3D# select * from a_table; > Killed Apparently the table is bigger than psql can hold in memory? The simplest way to do this is certainly to use pg_dump in one-table mode. If you're intent on using psql, you could use a cursor or OFFSET/LIMIT to fetch part of the table at a time. regards, tom lane