Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | aggregator.patch0 | 2.23 KB | AlanChandler |
Comments
Comment #1
AlanChandler CreditAttribution: AlanChandler commentedI 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
Comment #2
Dries CreditAttribution: Dries commentedAlan, I committed a slightly modified version of your patch (i.e. I used trim() instead of rtrim()). Thanks and keep it coming!
Comment #3
Dries CreditAttribution: Dries commentedComment #4
(not verified) CreditAttribution: commented