Re: [SQL] Insert a long text - Mailing list pgsql-sql

From tolik@icomm.ru (Anatoly K. Lasareff)
Subject Re: [SQL] Insert a long text
Date
Msg-id 87ww1ed1gx.fsf@tolikus.hq.aaanet.ru
Whole thread Raw
In response to Re: [SQL] Insert a long text  (Brian Baquiran <brianb@evoserve.com>)
Responses Re: [SQL] Insert a long text  (Frank Barknecht <barknech@ph-cip.uni-koeln.de>)
List pgsql-sql
>>>>> "BB" == Brian Baquiran <brianb@evoserve.com> writes:

 >> I want to insert a long text (up to 10.000 words) into a table (for example, table1) into a field (field1) which is
a'text' field. 
 >> I have tried the followings:
 >> INSERT INTO table1 VALUES (' long text'...)
 >> UPDATE table1 SET field1='long text'
 >> and is not working.
 >> I'm using servlets and Apache server, on Linux.

 BB> What data type are you using for the text field? As far as I know, the 'text'
 BB> datatype can only take 8K.

 BB> I don't know what the maximum size for varchar is.

 BB> Brian

8K is maximum length of whole record. In your case you must use 'large
objects' as datatype for big text.

--
Anatoly K. Lasareff              Email:       tolik@icomm.ru
Senior programmer

pgsql-sql by date:

Previous
From: Brian Baquiran
Date:
Subject: Re: [SQL] Insert a long text
Next
From: Marc Grimme
Date:
Subject: SQL-Query 2 get primary key