Thread: are long strings (500 char?) working?

are long strings (500 char?) working?

From
Heitzso
Date:
I've tried using both PreparedStatement and regular Statement
modes with a 450 character string:

SELECT response, last_requested
FROM dataweb_response_cache
WHERE request = 'long string here'

and

SELECT response, last_requested
FROM dataweb_response_cache
WHERE request = ?
(PreparedStatement form)

and I consistenly get parse error around
LIKE or =  (I've tried both)

though the same query works fine in
short string form anyway with psql
(haven't tried long string form, will
if advised).  The short string I substituted
for the long string otherwise had all
of the quirks of the long string




Re: are long strings (500 char?) working?

From
Barry Lind
Date:
Heirzso,

There is no limit.  What version of the database and jdbc driver are you
using?  Also, can you turn on database debug so that the server prints
out the exact sql statement it is getting from the jdbc client?  (this
statement will have the bound values from the prepared statement in it)
By looking at that sql statement you should be able to figure out what
is wrong.  If you still can't, please send that statement to the mail list.

thanks,
--Barry

Heitzso wrote:

> I've tried using both PreparedStatement and regular Statement
> modes with a 450 character string:
>
> SELECT response, last_requested
> FROM dataweb_response_cache
> WHERE request = 'long string here'
>
> and
>
> SELECT response, last_requested
> FROM dataweb_response_cache
> WHERE request = ?
> (PreparedStatement form)
>
> and I consistenly get parse error around
> LIKE or =  (I've tried both)
>
> though the same query works fine in
> short string form anyway with psql
> (haven't tried long string form, will
> if advised).  The short string I substituted
> for the long string otherwise had all
> of the quirks of the long string
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>