Port Bug Report: Query buffer exceeded ; using psql -e , or -f, or \i

From: Unprivileged user <nobody>
To: pgsql-ports(at)postgresql(dot)org
Subject: Port Bug Report: Query buffer exceeded ; using psql -e , or -f, or \i
Date: 1999-01-19 01:10:07
Message-ID: 199901190110.UAA03431@hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports


============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================

Your name : Silvio Macedo
Your email address : smacedo(at)inescn(dot)pt

Category : unknown
Severity : serious

Summary: Query buffer exceeded ; using psql -e , or -f, or \i

System Configuration
--------------------
Operating System : linux 2.0.36 (elf) Redhat 5.0+5.2 recompiled kernel

PostgreSQL version : 6.4.1(corrected;=6.4.2)

Compiler used : gcc 2.7.2.3

Hardware:
---------
P133;64RAM;3G
Linux pluto 2.0.36 #1 Tue Oct 13 22:17:11 EDT 1998 i586 unknown
rpm -q glibc:
glibc-2.0.7-29

Versions of other tools:
------------------------
GNU Make version 3.76.1
flex version 2.5.4

--------------------------------------------------------------------------

Problem Description:
--------------------
Date: Fri, 15 Jan 1999 18:41:34 +0000 (WET)
From: Silvio Emanuel Barbosa de Macedo <smacedo(at)inescn(dot)pt>
To: pgsql general mailing list <pgsql-general(at)postgresql(dot)org>
Subject: Query is too long

Hi!
I was using psql to insert data into the database.
I have *.sql files with the necessary scripts, eg:

insert into descritor values (4992,'MARCHAS DE LISBOA','te','cl');

After many inserts... I've got this message:

query buffer max length of 20000 exceeded
query line ignored

and then, a few inserts later, because the scritp went on...
PQsendQuery() -- query is too long. Maximum length is 8191
query buffer max length of 20000 exceeded
query line ignored
Segmentation fault (core dumped)

Gdb on the core:
(gdb) bt
#0 0x401066f8 in ?? () from /lib/libc.so.6
#1 0x401066a1 in ?? () from /lib/libc.so.6
#2 0x804e85b in MainLoop ()
#3 0x804df44 in HandleSlashCmds ()
#4 0x804e7c0 in MainLoop ()
#5 0x804ef2d in main ()

What has happened ? How can I avoid it ? Maybe using psql -f instead using
\i inside psql ?

--

Many others have the same problem.
psql -e < xxx.sql has the same problem!

--------------------------------------------------------------------------

Test Case:
----------
I think it's just a matter of creating a big sql
script and executing...

I can send mine, if you want (thousands of lines...)

--------------------------------------------------------------------------

Solution:
---------
I've tried to break the scripts in two. No deal... the same.
After the first piece is inserted, when I proceed to the
second sql script, even if I quit psql and enter it again,
after a few inserts, it happens again...

--------------------------------------------------------------------------

Browse pgsql-ports by date

  From Date Subject
Next Message john adams 1999-01-19 13:19:57 Cobalt Qube
Previous Message anonimno 1999-01-18 20:26:46 Krivice zapisane v slovenski ustavi