Thread: PQexec() 8191 bytes limit and text fields

PQexec() 8191 bytes limit and text fields

From
"Steve Howe"
Date:
Hello all,

       Writing my interface application, which use the PQexec library, I
came across the PQexec() queries 8191 bytes limit.       What useful are 4Gb text fields if I have this limit ?       I
mean,if a user make an update to this field, with a large value
 
(let's say, 4Mb), do I have to call PQexec multiple (more then 500) times,
concatenating the strings each time I call it ??? Can't this be better
implemented ? This is too slow, and generates much more traffic then I ever
wish.       This problem also plagues the large objects API, since they're only
a wrapper to the built-in large objects API.       Does anyone have a better way of doing this ?

Best Regards,
Steve Howe
http://www.vitavoom.com




Re: PQexec() 8191 bytes limit and text fields

From
"Mitch Vincent"
Date:
    First, are you using the latest PG? I was under the impression that all
the hard-coded limitations on size had been eliminated in the latest
releases. I know for an absolute fact that I can insert multi-megabyte sized
text chunks in PG 7.1.2 as I've done just that before...
   Good luck!

-Mitch

----- Original Message -----
From: "Steve Howe" <howe@carcass.dhs.org>
To: <pgsql-hackers@postgresql.org>
Sent: Wednesday, July 18, 2001 4:51 AM
Subject: [HACKERS] PQexec() 8191 bytes limit and text fields


> Hello all,
>
>
>         Writing my interface application, which use the PQexec library, I
> came across the PQexec() queries 8191 bytes limit.
>         What useful are 4Gb text fields if I have this limit ?
>         I mean, if a user make an update to this field, with a large value
> (let's say, 4Mb), do I have to call PQexec multiple (more then 500) times,
> concatenating the strings each time I call it ??? Can't this be better
> implemented ? This is too slow, and generates much more traffic then I
ever
> wish.
>         This problem also plagues the large objects API, since they're
only
> a wrapper to the built-in large objects API.
>         Does anyone have a better way of doing this ?
>
> Best Regards,
> Steve Howe
> http://www.vitavoom.com
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://www.postgresql.org/search.mpl
>



Re: PQexec() 8191 bytes limit and text fields

From
Tom Lane
Date:
"Steve Howe" <howe@carcass.dhs.org> writes:
>         Writing my interface application, which use the PQexec library, I
> came across the PQexec() queries 8191 bytes limit.

You must have a very out-of-date library.  Time to update.
        regards, tom lane


Re: PQexec() 8191 bytes limit and text fields

From
"Steve Howe"
Date:
Hi...
       The problem is, I compiled it myself from original PostgreSQL
version 7.12 C sources using Microsoft's Visual C++ 6.0. I had to compile it
because I add a function to free the handlers returned from PQnotifies(), or
I would have a memory leak.       The resulting libpq.dll seems ok in everything but this issue...       I guess I'll
doit again, after checking the sources :)       Other people reported me they send large queries with no problems,
 
so I guess it should really be a problem of mine...

Best Regards,
Steve Howe

----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "Steve Howe" <howe@carcass.dhs.org>
Cc: <pgsql-hackers@postgresql.org>
Sent: Wednesday, July 18, 2001 1:14 PM
Subject: Re: [HACKERS] PQexec() 8191 bytes limit and text fields


> "Steve Howe" <howe@carcass.dhs.org> writes:
> >         Writing my interface application, which use the PQexec library,
I
> > came across the PQexec() queries 8191 bytes limit.
>
> You must have a very out-of-date library.  Time to update.
>
> regards, tom lane
>



Re: [HACKERS - GENERAL] PQexec() 8191 bytes limit and text fields

From
"Mitch Vincent"
Date:
Hi Steve, lets approach this from the other angle...

I don't see anywhere in your email where you say what makes you think that
you can only pass a query > 8191 bytes in size to PG. What exactly makes you
think that there is some hard coded limit? This limit is not in 7.1.2 so
either you have outdated source code or the problem is somewhere else..

Good luck!

-Mitch


----- Original Message -----
From: "Steve Howe" <howe@carcass.dhs.org>
To: "Tom Lane" <tgl@sss.pgh.pa.us>
Cc: <pgsql-hackers@postgresql.org>
Sent: Wednesday, July 18, 2001 1:30 PM
Subject: Re: [HACKERS] PQexec() 8191 bytes limit and text fields


> Hi...
>
>         The problem is, I compiled it myself from original PostgreSQL
> version 7.12 C sources using Microsoft's Visual C++ 6.0. I had to compile
it
> because I add a function to free the handlers returned from PQnotifies(),
or
> I would have a memory leak.
>         The resulting libpq.dll seems ok in everything but this issue...
>         I guess I'll do it again, after checking the sources :)
>         Other people reported me they send large queries with no problems,
> so I guess it should really be a problem of mine...
>
> Best Regards,
> Steve Howe
>
> ----- Original Message -----
> From: "Tom Lane" <tgl@sss.pgh.pa.us>
> To: "Steve Howe" <howe@carcass.dhs.org>
> Cc: <pgsql-hackers@postgresql.org>
> Sent: Wednesday, July 18, 2001 1:14 PM
> Subject: Re: [HACKERS] PQexec() 8191 bytes limit and text fields
>
>
> > "Steve Howe" <howe@carcass.dhs.org> writes:
> > >         Writing my interface application, which use the PQexec
library,
> I
> > > came across the PQexec() queries 8191 bytes limit.
> >
> > You must have a very out-of-date library.  Time to update.
> >
> > regards, tom lane
> >
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>