Lists: | pgsql-jdbc |
---|
From: | Erwin Ambrosch <erwin(at)ebutec(dot)com> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | SQL-Statement is too long |
Date: | 2001-10-29 16:52:26 |
Message-ID: | 3BDD894A.4090207@ebutec.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-jdbc |
Hi,
I'm using Postgesql 7.0.3-8 and the postgresql-jdbc2.jar to talk to the
databse from within Java. I tried to write a quite long text into a TEXT
column, and got the following SQLExcpetion: The SQL Statement is too
long - INSERT INTO ...
A file which contains the text has a size of 9244 byte. Are there any
restriction for the length of a TEXT column.
Thank you for any response.
Erwin
From: | Jason Davies <jason(at)netspade(dot)com> |
---|---|
To: | erwin(dot)ambrosch(at)ebutec(dot)com |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: SQL-Statement is too long |
Date: | 2001-10-30 19:24:13 |
Message-ID: | 20011030132413.A25075@netspade.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-jdbc |
Erwin,
This is probably because you have PostgreSQL compiled with the default blocksize, which is 8k. You can recompile with a larger blocksize, but I think it may be configurable in version 7.1. It's not the JDBC driver's fault anyway :)
Jason
On Mon, Oct 29, 2001 at 05:52:26PM +0100, Erwin Ambrosch wrote:
> Hi,
>
> I'm using Postgesql 7.0.3-8 and the postgresql-jdbc2.jar to talk to the
> databse from within Java. I tried to write a quite long text into a TEXT
> column, and got the following SQLExcpetion: The SQL Statement is too
> long - INSERT INTO ...
>
> A file which contains the text has a size of 9244 byte. Are there any
> restriction for the length of a TEXT column.
>
> Thank you for any response.
>
> Erwin
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
--
Jason Davies
jason(at)netspade(dot)com
From: | Barry Lind <barry(at)xythos(dot)com> |
---|---|
To: | erwin(dot)ambrosch(at)ebutec(dot)com |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: SQL-Statement is too long |
Date: | 2001-10-31 02:54:49 |
Message-ID: | 3BDF67F9.2020006@xythos.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-jdbc |
Erwin,
Prior to 7.0, postgres only supported sql statements that were 8K long
(or actually blocksize long which could be from 8K - 32K, but is 8K by
default). That restriction was removed from the server in 7.0, however
arly versions on the 7.0 driver still had this restriction. This bug
was fixed in later 7.0 versions of the jdbc driver.
thanks,
--Barry
Erwin Ambrosch wrote:
> Hi,
>
> I'm using Postgesql 7.0.3-8 and the postgresql-jdbc2.jar to talk to the
> databse from within Java. I tried to write a quite long text into a TEXT
> column, and got the following SQLExcpetion: The SQL Statement is too
> long - INSERT INTO ...
>
> A file which contains the text has a size of 9244 byte. Are there any
> restriction for the length of a TEXT column.
>
> Thank you for any response.
>
> Erwin
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>