I'm not sure, so I'll post it here hoping someone with an idea can jump in... 
---# Adding new settings ...
INSERT IGNORE INTO {$db_prefix}settings
(variable, value)
VALUES
('avatar_default', '0'),
('visual_verification_num_chars', '6'),
('gravatar_rating', 'g');
---#
Is this correct?
Does the upgrade take care of splitting this into 3 different queries for SQLite and Postgre?
ETA: and anyway the MySQL file has more settings...