okfn/ckan — pull request #893 by themgt (2013-05-10 20:39:23+00:00)
Title: datastore plugin pgsql check on datastore DB, not main DB

I ran into a confusing situation here, getting "We detected that you do not use a PostgreSQL database. The DataStore will NOT work and DataStore tests will be skipped." I had the datastore as postgres://, so I tried changing to postgresql:// and got the same error. I googled, found PR 359 which says it's looking for 'postgresql', got more confused, looked through the code ...

Finally realized the code is checking the sqlalchemy.url, *not* the datastore URL. This doesn't seem to be the right behavior or match the error message, so I made a simple patch to apply the same drivername startswith check to the datastore write_url directly, which seems the least-invasive way to make the behavior/error more understandable.