liberapay/postgres.py

ORM register_model does not work outside of "public" schema

ChiliConSql opened this issue · 1 comments

if I have a table in a schema other than public, Psycopg2 will check for the form 'schema.type' but postgres.py does not, so a model with typname 'type' will pass:
631 n = self.one( "SELECT count(*) FROM pg_type WHERE typname=%s"
632 , (typname,)
633 )
but it will fail in psycopg2.extras because of missing schema name.

Thanks for the report. Were you able to find a workaround? Any monkeypatching code you can paste? Tests? PR? :-)