Searching result in a call to watchdog that is longer than the 128 maximum characters.
I'm unsure how to fix this - either we shouldn't pass long-ish strings to watchdog() or watchdog should trim them before attempting an insert.
warning: pg_query() [function.pg-query]: Query failed: ERROR: value too long for type character varying(128) in /home/brenda/workspace/drupal/drupal6/includes/database.pgsql.inc on line 139.
user warning: ERROR: value too long for type character varying(128) query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'search', '%keys (@type).', 'a:2:{s:5:"%keys";s:42:"this is a really really really long string";s:5:"@type";s:7:"Content";}', 5, 'results', 'http://gargi.wgtn.cat-it.co.nz/search/node/this%20is%20a%20really%20real...', 'http://dnc.gargi.wgtn.cat-it.co.nz/search/node/Real%20estate%20services%...', '192.168.2.42', 1247752598) in /home/brenda/workspace/drupal/drupal6/modules/dblog/dblog.module on line 144.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | drupal-dblog-pgsql.patch | 448 bytes | jamespharaoh |
Comments
Comment #1
Shiny commentedThe call is here:
Comment #2
jamespharaoh commentedYes, watchdog is trying to put too much data into the field. I would change this field to accept any size text but a simple solution is just to trim it as it goes in. The attached patch will do that.
Comment #3
dave reidDuplicate of #107824: Convert {watchdog}.referer and {accesslog}.url from VARCHAR to TEXT