Most of the INSERT queries use MySQL-only syntax that is not ANSI INSERT syntax and thus bails in PostgreSQL and likely any other future db that Drupal makes it on. The attached patch addresses these. Also there are a couple UPDATE queries where one of the columns being updated is variable and so can be an integer or varchar but the placeholder used in the queries is '%s' which is only for strings. Again MySQL glosses over this (probably would fail in ANSI strict mode) but PostgreSQL rightly complains. The patch tests the $field_name for whether it's the varchar column or an int and uses the db_placeholders() function to set the right placeholder.
See related issue #340765: Install issue inserting data into tables
| Comment | File | Size | Author |
|---|---|---|---|
| friendlist.patch | 6.72 KB | jaydub |
Comments
Comment #1
mercmobily commentedHi,
Committed!
Merc.
Comment #2
morbus iffYou shouldn't be using INSERT or UPDATE anyways; you should be using drupal_write_record().
Comment #3
mercmobily commentedHi,
Since there is technically no bug, changing this into a feature request.
I don't really trust drupal_write_record just yet, I am watching what's going on with Drupal 7 and how abstract the db gets.
Bye,
Merc.
Comment #4
mercmobily commentedHi,
Postponing to D7.
Merc.
Comment #5
mercmobily commented