FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Query failed: ERROR: value too long for type character varying(100) (Importing newsgroup posts into FUDforum)
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Query failed: ERROR: value too long for type character varying(100) [message #161899] Thu, 18 February 2010 15:10 Go to next message
ggeldenhuys is currently offline  ggeldenhuys
Messages: 3
Registered: February 2010
Location: South Africa
Karma: 0
Junior Member
Hi,

So far I'm very impressed with FUDforum. Some very nice features and the basic install went very easy.

I'm now trying to import NNTP news posts into my forums. I tried with a small test newsgroup first and it worked fine.

Then I tried importing my larger newsgroups 6000+ messages and got some encoding error. Not a valid UTF-8 byte sequence. From another post I read that I must change the PostgreSQL client_encoding settings. I changed mine to 'latin1' and the import continued nicely. Now I hit another problem and have no clue what to do. Also I know nothing about PHP.

Below is my new error.... Any suggestions?


-------------------------
...snip...
Importing tiopf.development message 1375
Importing tiopf.development message 1376

Warning: pg_query(): Query failed: ERROR: value too long for type character varying(100) in /home/graemeg/public_html/forum_data/include/theme/default/db.inc on line 93
(/home/graemeg/public_html/forum_data/include/theme/default/db.inc:93<br />
/home/graemeg/public_html/forum_data/include/theme/default/db.inc:189<br />
/home/graemeg/public_html/forum_data/include/theme/default/imsg_edt.inc:112 <br />
/home/graemeg/public_html/forum_data/include/nntp.inc:579<br />
/home/graemeg/public_html/forum_data/scripts/nntp.php:92<br />
) : ERROR: value too long for type character varying(100)<br />
Query: INSERT INTO fud30_msg (
thread_id,
poster_id,
reply_to,
ip_addr,
host_name,
post_stamp,
subject,
attach_cnt,
poll_id,
icon,
msg_opt,
file_id,
foff,
length,
file_id_preview,
offset_preview,
length_preview,
mlist_msg_id,
poll_cache,
flag_cc,
flag_country
) VALUES(
0,
14,
0,
'192.168.3.3',
NULL,
1188286555,
'I think it''s time to remove TtiObjectList.Add(const AObject: TtiObject; ADefDispOrdr: Boolean): integer;',
0,
0,
NULL,
3,
0,
-1,
669,
0,
-1,
0,
'8f3(dot)46d3d05b(dot)4c131(at)localhost(dot)localdomain',
NULL,
NULL,
NULL
)<br />
Server Version: PostgreSQL 8.4.2 on x86_64-pc-linux-gnu, compiled by GCC gcc-4.2.real (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu4), 64-bit<br />

--------------------------
Re: Query failed: ERROR: value too long for type character varying(100) [message #161900 is a reply to message #161899] Thu, 18 February 2010 15:25 Go to previous messageGo to next message
ggeldenhuys is currently offline  ggeldenhuys
Messages: 3
Registered: February 2010
Location: South Africa
Karma: 0
Junior Member
OK, I seem to have solved the problem.

I changes the 'subject' field in the Postgresql database from size 100 to size 200. Not sure what the consequence of that will be, but now the import ran successfully to the end.

Cheers,
- Graeme -
Re: Query failed: ERROR: value too long for type character varying(100) [message #161901 is a reply to message #161900] Thu, 18 February 2010 19:57 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
That's the correct solution, either chop if off at 100 chars or increase the column's length. I'll ensure it gets fixed before the next release.
Re: Query failed: ERROR: value too long for type character varying(100) [message #161903 is a reply to message #161901] Fri, 19 February 2010 07:39 Go to previous message
ggeldenhuys is currently offline  ggeldenhuys
Messages: 3
Registered: February 2010
Location: South Africa
Karma: 0
Junior Member
I got a similar problem importing another one of my newsgroups. This time it was in the table 'fud30_search' and field 'word'.

I had to increase the string field size from 50 to 100.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: NNTP Import of Messages without Content-Type in Header
Next Topic: Problem with FUDforum API global variables
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Dec 03 19:02:33 GMT 2024

Total time taken to generate the page: 0.03778 seconds