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

CommentFileSizeAuthor
#1 update_1006_pgsql.patch.txt812 bytesdww

Comments

dww’s picture

Assigned: Unassigned » dww
Status: Active » Reviewed & tested by the community
StatusFileSize
new812 bytes

ok, 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. ;)

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)