Closed (fixed)
Project:
Drupal core
Version:
x.y.z
Component:
update system
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
7 Sep 2006 at 01:13 UTC
Updated:
21 Sep 2006 at 08:15 UTC
Jump to comment: Most recent file
if you try to update a 4.7 pgsql site to 5.0 (after applying http://drupal.org/node/82177 http://drupal.org/node/82524 and http://drupal.org/node/82806 to update.php and friends so the update works at all), you'll find that update 1006 contains bogus SQL that's invalid on pgsql. here are the errors:
warning: pg_query(): Query failed: ERROR: syntax error at end of input at character 44 in /Users/wright/drupal/cvs/head/core.cvs/includes/database.pgsql.inc on line 119.
user warning: query: ALTER TABLE blocks ALTER title SET default in /Users/wright/drupal/cvs/head/core.cvs/includes/database.pgsql.inc on line 138.
warning: pg_query(): Query failed: ERROR: syntax error at end of input at character 27 in /Users/wright/drupal/cvs/head/core.cvs/includes/database.pgsql.inc on line 119.
user warning: query: UPDATE blocks SET title = in /Users/wright/drupal/cvs/head/core.cvs/includes/database.pgsql.inc on line 138.
warning: pg_query(): Query failed: ERROR: column "title" contains null values in /Users/wright/drupal/cvs/head/core.cvs/includes/database.pgsql.inc on line 119.
user warning: query: ALTER TABLE blocks ALTER title SET NOT NULL in /Users/wright/drupal/cvs/head/core.cvs/includes/database.pgsql.inc on line 138.
again, should be fairly easy to fix, i just have to run right now. if no one else rolls a patch, i'll try to fix this in the next day or 2.
-derek
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | update_1006_pgsql.patch.txt | 812 bytes | dww |
Comments
Comment #1
dwwok, this one was trivial. improper quoting in
db_add_column(). i'll be bold and RTBC it myself, since i've a) hit this bug before, b) fixed the doxygen to document the right use of this function (http://drupal.org/node/69659), and c) tested this patch on my pgsql test site and had no troubles. ;)Comment #2
dries commentedCommitted to CVS HEAD. Thanks.
Comment #3
(not verified) commented