Thread: PQsendQuery: Query is too long

PQsendQuery: Query is too long

From
Henrik Steffen
Date:
Hello all,

when doing larger queries, e.g. an insert of lots of text,
I always get "Query too long" if the query is longer then 8192 bytes.

a) What exactly is the reason for this limitation? (postgres, libpq or Pg.pm?)

b) What can I do to avoid this limitation?

Thanks for your help

--

Mit freundlichem Gruß

Henrik Steffen
Geschäftsführer

top concepts Internetmarketing GmbH
Am Steinkamp 7 - D-21684 Stade - Germany
--------------------------------------------------------
http://www.topconcepts.com          Tel. +49 4141 991230
mail: steffen@topconcepts.com       Fax. +49 4141 991233
--------------------------------------------------------
24h-Support Hotline:  +49 1908 34697 (€ 1.86/Min,topcon)
--------------------------------------------------------
System-Partner gesucht: http://www.franchise.city-map.de
--------------------------------------------------------
Handelsregister: AG Stade HRB 5811 - UstId: DE 213645563
--------------------------------------------------------

Re: PQsendQuery: Query is too long

From
Doug McNaught
Date:
Henrik Steffen <steffen@city-map.de> writes:

> Hello all,
>
> when doing larger queries, e.g. an insert of lots of text,
> I always get "Query too long" if the query is longer then 8192 bytes.
>
> a) What exactly is the reason for this limitation? (postgres, libpq or Pg.pm?)

You don't say what software versions you're using.  The 8k tuple-size
limit has been gone in PG since 7.1, but many client-side libraries
still enforce an 8k query limit for basically stupid reasons.

> b) What can I do to avoid this limitation?

Upgrade.

-Doug
--
Let us cross over the river, and rest under the shade of the trees.
   --T. J. Jackson, 1863

Re: PQsendQuery: Query is too long

From
Tom Lane
Date:
Henrik Steffen <steffen@city-map.de> writes:
> when doing larger queries, e.g. an insert of lots of text,
> I always get "Query too long" if the query is longer then 8192 bytes.

> a) What exactly is the reason for this limitation?

Too old postgres.  There is no such limit in 7.0 or later.

            regards, tom lane

Re: PQsendQuery: Query is too long

From
Henrik Steffen
Date:
ah, well, I am using 7.0.3 - so that should be the reason.

>
> You don't say what software versions you're using.  The 8k tuple-size
> limit has been gone in PG since 7.1, but many client-side libraries
> still enforce an 8k query limit for basically stupid reasons.
>
> > b) What can I do to avoid this limitation?
>
> Upgrade.

I certainly will.

Thanks for your help!

--

Mit freundlichem Gruß

Henrik Steffen
Geschäftsführer

top concepts Internetmarketing GmbH
Am Steinkamp 7 - D-21684 Stade - Germany
--------------------------------------------------------
http://www.topconcepts.com          Tel. +49 4141 991230
mail: steffen@topconcepts.com       Fax. +49 4141 991233
--------------------------------------------------------
24h-Support Hotline:  +49 1908 34697 (€ 1.86/Min,topcon)
--------------------------------------------------------
System-Partner gesucht: http://www.franchise.city-map.de
--------------------------------------------------------
Handelsregister: AG Stade HRB 5811 - UstId: DE 213645563
--------------------------------------------------------

Re: PQsendQuery: Query is too long

From
"Mitch Vincent"
Date:
That limit was gone in 7.0 though -- are you sure you're linking against the
right libs?


----- Original Message -----
From: "Henrik Steffen" <steffen@city-map.de>
To: "Doug McNaught" <doug@wireboard.com>
Cc: <pgsql-general@postgresql.org>
Sent: Wednesday, January 16, 2002 9:23 AM
Subject: Re: [GENERAL] PQsendQuery: Query is too long


>
> ah, well, I am using 7.0.3 - so that should be the reason.
>
> >
> > You don't say what software versions you're using.  The 8k tuple-size
> > limit has been gone in PG since 7.1, but many client-side libraries
> > still enforce an 8k query limit for basically stupid reasons.
> >
> > > b) What can I do to avoid this limitation?
> >
> > Upgrade.
>
> I certainly will.
>
> Thanks for your help!
>
> --
>
> Mit freundlichem Gruß
>
> Henrik Steffen
> Geschäftsführer
>
> top concepts Internetmarketing GmbH
> Am Steinkamp 7 - D-21684 Stade - Germany
> --------------------------------------------------------
> http://www.topconcepts.com          Tel. +49 4141 991230
> mail: steffen@topconcepts.com       Fax. +49 4141 991233
> --------------------------------------------------------
> 24h-Support Hotline:  +49 1908 34697 (? 1.86/Min,topcon)
> --------------------------------------------------------
> System-Partner gesucht: http://www.franchise.city-map.de
> --------------------------------------------------------
> Handelsregister: AG Stade HRB 5811 - UstId: DE 213645563
> --------------------------------------------------------
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>


Re: PQsendQuery: Query is too long

From
Henrik Steffen
Date:
no, not sure :(
how can i check? and where to get the right libs?

Mitch Vincent schrieb:
>
> That limit was gone in 7.0 though -- are you sure you're linking against the
> right libs?
>
> ----- Original Message -----
> From: "Henrik Steffen" <steffen@city-map.de>
> To: "Doug McNaught" <doug@wireboard.com>
> Cc: <pgsql-general@postgresql.org>
> Sent: Wednesday, January 16, 2002 9:23 AM
> Subject: Re: [GENERAL] PQsendQuery: Query is too long
>
> >
> > ah, well, I am using 7.0.3 - so that should be the reason.
> >
> > >
> > > You don't say what software versions you're using.  The 8k tuple-size
> > > limit has been gone in PG since 7.1, but many client-side libraries
> > > still enforce an 8k query limit for basically stupid reasons.
> > >
> > > > b) What can I do to avoid this limitation?
> > >
> > > Upgrade.
> >
> > I certainly will.
> >
> > Thanks for your help!
> >
> > --
> >
> > Mit freundlichem Gruß
> >
> > Henrik Steffen
> > Geschäftsführer
> >
> > top concepts Internetmarketing GmbH
> > Am Steinkamp 7 - D-21684 Stade - Germany
> > --------------------------------------------------------
> > http://www.topconcepts.com          Tel. +49 4141 991230
> > mail: steffen@topconcepts.com       Fax. +49 4141 991233
> > --------------------------------------------------------
> > 24h-Support Hotline:  +49 1908 34697 (? 1.86/Min,topcon)
> > --------------------------------------------------------
> > System-Partner gesucht: http://www.franchise.city-map.de
> > --------------------------------------------------------
> > Handelsregister: AG Stade HRB 5811 - UstId: DE 213645563
> > --------------------------------------------------------
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 2: you can get off all lists at once with the unregister command
> >     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
> >
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

--

Mit freundlichem Gruß

Henrik Steffen
Geschäftsführer

top concepts Internetmarketing GmbH
Am Steinkamp 7 - D-21684 Stade - Germany
--------------------------------------------------------
http://www.topconcepts.com          Tel. +49 4141 991230
mail: steffen@topconcepts.com       Fax. +49 4141 991233
--------------------------------------------------------
24h-Support Hotline:  +49 1908 34697 (€ 1.86/Min,topcon)
--------------------------------------------------------
System-Partner gesucht: http://www.franchise.city-map.de
--------------------------------------------------------
Handelsregister: AG Stade HRB 5811 - UstId: DE 213645563
--------------------------------------------------------