Thread: Re: query buffer exceed - Solution for common error

Re: query buffer exceed - Solution for common error

From
Silvio Emanuel Barbosa de Macedo
Date:
>Have you got any answer for the 'query buffer 20K exceeded' problem?
>I am experiencing the same problem.

Hi there!

I've even get to debug psql, but in that process I found my problem. One
of the strings that I was inserting into the database in a INSERT
statement, had one erroneous extra tick ['].

The result was that psql stopped to read the string at the first closing
tick, and then all the text it read was included as a second  string
starting on the second closing tick. (as it happens many times when
programming and you don't close brackets, or when you forget to close "s).

After many queries (20K!) being read into that string, it core dumps.
This error was hard to find because psql only dumps core 20K bytes after
the real error.

So, my advice is that you have the output of psql written into a file
 ( with psql -e -f foo.sql >& file.out ) and  look for a
missing, or extra tick, somewhere before the actual error message.


Hope this helps!

,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
`````````````````````````````````````````````
Silvio Emanuel Nunes Barbosa de Macedo
mailto:smacedo@inescn.pt

INESC - Porto - Grupo CAV
Pc da Republica, 93 R/C   Tel:351 2 209 42 21
4000 PORTO  PORTUGAL      Fax:351 2 208 41 72