| From: | Bob Dusek <bobd(at)palaver(dot)net> | 
|---|---|
| To: | Silvio Emanuel Barbosa de Macedo <smacedo(at)inescn(dot)pt> | 
| Cc: | pgsql general mailing list <pgsql-general(at)postgreSQL(dot)org> | 
| Subject: | Re: [GENERAL] Query is too long | 
| Date: | 1999-01-15 22:51:51 | 
| Message-ID: | Pine.LNX.3.96.990115175118.513H-100000@temp.palaver.net | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
Sorry,
I should have been more clear:
> One way to execute .sql scripts in your database is this:
> 
> psql -e dbname < script.sql
That should be done from the command line.
> That is how we recreate our databases from a dump file.
> 
> "psql -ef script.sql dbname" seems to have the same problem
> you were having with the \i command:
> 
> query buffer max length of 20000 exceeded
> 
> good luck,
> 
> Bob
> 
> 
> On Fri, 15 Jan 1999, Silvio Emanuel Barbosa de Macedo wrote:
> 
> > 
> > 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 ?
> > 
> > 
> > 
> > ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
> > `````````````````````````````````````````````
> > Silvio Emanuel Nunes Barbosa de Macedo
> > mailto:smacedo(at)inescn(dot)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
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> 
> 
> 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Paulo da Silva | 1999-01-15 22:59:18 | GUI | 
| Previous Message | Bob Dusek | 1999-01-15 22:45:07 | Re: [GENERAL] Query is too long |