Обсуждение: wierd error

Поиск
Список
Период
Сортировка

wierd error

От
"Travis Hoyt"
Дата:
 select * from mydata where to_char(time, 'SS') != '00';
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)

Anyone know what this means?  I can do a select count(*) on this and it
comes back with a value, approx 460k rows.
I can also do the above select and throw a limit 5 and it will return
those 5 rows...but when I try to run it against
the table and return all results I get the errors above.

Thanks,

Travis

Вложения

Re: wierd error

От
Tom Lane
Дата:
"Travis Hoyt" <thoyt@npc.net> writes:
>  select * from mydata where to_char(time, 'SS') != '00';
> server sent data ("D" message) without prior row description ("T" message)
> server sent data ("D" message) without prior row description ("T" message)

> Anyone know what this means?  I can do a select count(*) on this and it
> comes back with a value, approx 460k rows.

You're running out of memory for the results on the client side.
libpq is not very graceful about coping with that situation :-(
--- it doesn't crash, but it does forget that it was absorbing
a query result, so then you get all these bogus error messages.
Fixing this is on our TODO list, but it hasn't been very high
priority because in practice you want to avoid such situations in
the first place.

I'd suggest using a cursor to retrieve the huge result a few hundred
rows at a time.

            regards, tom lane

Re: wierd error

От
Oliver Elphick
Дата:
On Thu, 2002-03-07 at 15:27, Travis Hoyt wrote:
>  select * from mydata where to_char(time, 'SS') != '00';
> 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)
>
> Anyone know what this means?  I can do a select count(*) on this and it
> comes back with a value, approx 460k rows.

psql has run out of memory.


--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C

     "Go ye therefore, and teach all nations, baptizing them
      in the name of the Father, and of the Son, and of the
      Holy Ghost; Teaching them to observe all things
      whatsoever I have commanded you; and, lo, I am with
      you alway, even unto the end of the world. Amen."
                     Matthew 28:19,20