Re: PostgreSQL query failed: COPY state must be terminated first - Mailing list pgsql-general

From Jeff Eckermann
Subject Re: PostgreSQL query failed: COPY state must be terminated first
Date
Msg-id 20021017135818.12733.qmail@web20808.mail.yahoo.com
Whole thread Raw
In response to PostgreSQL query failed: COPY state must be terminated first  (Shane Wright <me@shanewright.co.uk>)
Responses Re: PostgreSQL query failed: COPY state must be terminated first  (Shane Wright <me@shanewright.co.uk>)
List pgsql-general
This kind of error usually indicates that your result
set has exceeded the available memory.  I think the
"COPY" message is just noise.
The workaround would be to declare your query as a
cursor, and fetch the results in manageable chunks.

--- Shane Wright <me@shanewright.co.uk> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi
>
> I have a (PHP) script that pulls a whole bunch of
> data from the database, does
> a bit to it and spits it out, but with a large set
> of data, I'm getting some
> really weird things happen!
>
> After doing a chunk of it (same place every time),
> it dies with this error:
>
> PostgreSQL query failed: COPY state must be
> terminated first
>
> And I get a whole bunch of random gubbins outputted
> too...
>
>
>
> oD��
> server sent data ("D" message) without prior row
> description ("T" message)
>
> server sent data ("D" message) without prior row
> description ("T" message)
>
> server sent data ("D" message) without prior row
> description ("T" message)
>
> server sent data ("D" message) without prior row
> description ("T" message)
>
> server sent data ("D" message) without prior row
> description ("T" message)
>
> server sent data ("D" message) without prior row
> description ("T" message)
>
> unexpected character Y following empty query
> response ("I" message)
>
> server sent data ("D" message) without prior row
> description ("T" message)
>
> oD��
> oD��
> server sent data ("D" message) without prior row
> description ("T" message)
>
> server sent data ("D" message) without prior row
> description ("T" message)
>
> server sent data ("D" message) without prior row
> description ("T" message)
>
> oD��
> server sent binary data ("B" message) without prior
> row description ("T"
> message)
>
> server sent binary data ("B" message) without prior
> row description ("T"
> message)
>
> server sent data ("D" message) without prior row
> description ("T" message)
>
> server sent data ("D" message) without prior row
> description ("T" message)
>
> server sent data ("D" message) without prior row
> description ("T" message)
>
>
>
> or this:
>
> oD��
> oD��
> CE
> unexpected character C following empty query
> response ("I" message)
>
>
>
> ...which all seems very strange - I'm not using a
> COPY (only SELECTs), and
> I've no idea what the rest means.
>
> Anyone seen this before?  Any idea what or why or
> how to fix it?  I'm using
> PostgreSQL 7.1.3 and PHP 4.1.1  (I know, I know,
> upgrade..  but I can't as
> its on my ISPs server..)
>
> Any help or any ideas appreciated...
>
> Cheers
>
> - --
> Shane
> http://www.shanewright.co.uk/
> Public key:
> http://www.shanewright.co.uk/files/public_key.asc
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.7 (GNU/Linux)
>
>
iD8DBQE9rpvE5DXg6dCMBrQRAtstAKCtxynOlPuOqKGV1csinhD+93cQDQCghwUN
> WjftHUqLKjo4jEy4HAXGmtw=
> =Il/B
> -----END PGP SIGNATURE-----
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please
> send an appropriate
> subscribe-nomail command to majordomo@postgresql.org
> so that your
> message can get through to the mailing list cleanly


__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

pgsql-general by date:

Previous
From: "Patrick Fiche"
Date:
Subject: pg_attribute always grow...
Next
From: Jochem van Dieten
Date:
Subject: Re: RV: bad result in a query!! :-(