a) check if you have nulls in the data. If you do, you must use type
'bytea' and SQL_BINARY to bind to it.

b) Postgres prior to 7.0 had a limit of 4096 bytes per tuple. Tuple header
takes around 50 bytes, so if you had any other fields, you'd be screwed.
Upgrade to latest.

On Thu, 12 Jul 2001, Ian Summers wrote:

> Hi
> 
> Can anyone enlighten me? I'm trying to insert a field with 4000 characters 
> into a Pg database which is specified as varchar(4000).
> 
> I've overcome various hurdles but it produces the following error as soon 
> as it encounters the LONG field:
> 
> DBD::Pg::st execute failed: PQsendQuery() -- There is no connection to the 
> backend.
> 
> 
> I've referred to the Programming Perl DBI  book and it states:
> 
> p306: No Bind output values - is this what's causing the problem
> p307: TEXT datatype has limit of 4096 - is this true?
> p221: Suggest that I could use:
> 
>       $sth->bind_param(5, 'Introduction', SQL_LONGVARCHAR);
> 
> but p311: tells me that SQL_LONGVARCHAR is not supported by DBI::Pg.
> 
> Is there a way to insert LONG data into Pg?
> 
> Ian
> 
> 

Reply via email to