You just cannot use LIMIT with a DELETE statement under PostgreSQL. This may be a limit, and certainly a nice optimization (since once the variable is deleted, you don't have to continue searching... although if the name column is marked as unique, the optimization is already built in any good SQL handler.)

Anyway, please, remove the LIMIT 1 from your install script:

/**
 * Update 6102 - Delete old boost permissions variable.
 */
function boost_update_6102() {
  // del variable
  return update_sql("DELETE FROM {variable} WHERE name = 'boost_permissions'");
}

Another way to delete a variable is to use the variable_del() function. Although that one would not return an error list the update_sql() function can.

Thank you.
Alexis Wilke

CommentFileSizeAuthor
#2 boost-510892.patch698 bytesmikeytown2

Comments

mikeytown2’s picture

Going to use http://api.drupal.org/api/function/comment_update_6002/6 for some inspiration. Thanks for pointing me in the right direction with variable_del().

mikeytown2’s picture

Status: Active » Needs review
StatusFileSize
new698 bytes

If you could test this, that would be great!

AlexisWilke’s picture

Status: Needs review » Reviewed & tested by the community

Hi mikey,

Looks good! 8-)

Thank you.
Alexis

mikeytown2’s picture

Status: Reviewed & tested by the community » Fixed

committed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

liam morland’s picture

Issue tags: +PostgreSQL