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
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | boost-510892.patch | 698 bytes | mikeytown2 |
Comments
Comment #1
mikeytown2 commentedGoing 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().
Comment #2
mikeytown2 commentedIf you could test this, that would be great!
Comment #3
AlexisWilke commentedHi mikey,
Looks good! 8-)
Thank you.
Alexis
Comment #4
mikeytown2 commentedcommitted
Comment #6
liam morland