<!-- language-all: lang-py --> The only way of forwarding a WHERE clause to the data provider (backend) at the moment is to use the *setSubsetString* method of *QgsDataProvider* If you have a QgsVectorLayer assigned to a variable *vl* : vl.setSubsetString( 'Counties = "Norwich"' ) This causes heavy side-effects, because the filter will then apply to the whole layer and not only to your query, so you have to carefully consider if this is really an option for your use case! Any other option will require a seperate connection to the database or adding a new layer with a subsetString as outlined above.