Re: psql memory usage when creating delimited files - Mailing list pgsql-general

From Volkan YAZICI
Subject Re: psql memory usage when creating delimited files
Date
Msg-id 20060918191746.GB1418@alamut
Whole thread Raw
In response to psql memory usage when creating delimited files  (David Brain <dbrain@bandwidth.com>)
List pgsql-general
On Sep 18 02:57, David Brain wrote:
> >Use COPY instead. (You can also prefer CURSORs in your client
> >applications. See related discussions.)
>
> Yes, but COPY isn't an option if I need to do:
>
>     SELECT * from really_big_table where foo='zebra' order by createddate
>
> Which is what I really need to do (forgot the where clause in the example).

For an alternative to COPY, IMHO you can create and use a CURSOR with
some help from shell (e.g. a while loop) to form a "FETCH FORWARD ..."
query family.

> Any other workarounds?

AFAIK, you'll be able to use subselects and views in COPY with 8.2
release.


Regards.

pgsql-general by date:

Previous
From: Geoffrey
Date:
Subject: Re: server resetting
Next
From: "Greg Sabino Mullane"
Date:
Subject: Re: plz unsubscribe me