bcarneiro/django-tenant-schemas — pull request #8 by rctay (2012-07-31 10:07:48+00:00)
Title: improve schema existence checking

- put schema existence checking logic in one place so we don't have SQL running around.
- use `SELECT EXISTS(...)` so we don't have to do `len(cursor.fetchall()) == 1` (or `> 0` elsewhere). One `todo` down!
- use `pg_namespace` instead of `information_schema` (see 35da955).

This prevents django-tenant-schemas from re-creating the `public` schema when running under a user other than `postgres`.