Various code that could potentially be adapted to work as a QGIS gazetteer plugin that connects to Postgres (and other forms of database too) and uses the full text search feature.
I have removed the sqlite databases that were within MyGazetteerSearchPlugin as they were particularly large and taking a long time to upload.
All files were provided by Tim Martin of the Ordnance Survey.