IN an attempt to manually update the feed from the bbc, I got the following error

warning: pg_query(): Query failed: ERROR: value too long for type character varying(255) in /usr/share/drupal/includes/database.pgsql.inc on line 104.

user error:
query: UPDATE aggregator_feed SET url = 'http://news.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss091.xml', checked = 1096234462, link = 'http://news.bbc.co.uk/go/click/rss/0.91/public/-/1/hi/default.stm

I can't tell from this error message which field it too long or why.

CommentFileSizeAuthor
#1 aggregator.patch02.23 KBAlanChandler
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

AlanChandler’s picture

FileSize
2.23 KB

I eventually tracked this down to a discover that the link being provided by the bbc had a large amount of white space (consisting of spaces and tab characters in equal abandon) at the end. The solution (not sure its good enough for permenant inclusion in the module is to rtrim the resultant strings before attempting to update the database.

The attached patch does that - but it also fixes a whole range of problems related to Postgres SQL being tighter than MySQL

Dries’s picture

Alan, I committed a slightly modified version of your patch (i.e. I used trim() instead of rtrim()). Thanks and keep it coming!

Dries’s picture

Anonymous’s picture