Re: psql memory usage when creating delimited files

From: Volkan YAZICI <yazicivo(at)ttnet(dot)net(dot)tr>
To: David Brain <dbrain(at)bandwidth(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: psql memory usage when creating delimited files
Date: 2006-09-18 19:17:46
Message-ID: 20060918191746.GB1418@alamut
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrew - Supernews 2006-09-18 19:47:15 Re: Initializing Datums for use with SPI_execute_plan
Previous Message Greg Sabino Mullane 2006-09-18 18:57:01 Re: plz unsubscribe me