diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-09-04 18:12:00 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-09-04 18:12:00 +0200 |
| commit | 3ff4feafd24bdbe8121f16e2c6aaea901204b3a8 (patch) | |
| tree | 7469ee4cfc69c3d27a273ff1dcd97cc7e2edf734 /odoo/tools/sql.py | |
| parent | c39ad11d443cb83891199a48e56af03e6fcdd786 (diff) | |
| parent | 4d4d75709dcd46ffa957a68fa2f884ec59042718 (diff) | |
[MERGE] forward port branch saas-15 up to 4d4d75709dc
Diffstat (limited to 'odoo/tools/sql.py')
| -rw-r--r-- | odoo/tools/sql.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/odoo/tools/sql.py b/odoo/tools/sql.py index 563ed08c679..239cee73fd1 100644 --- a/odoo/tools/sql.py +++ b/odoo/tools/sql.py @@ -23,7 +23,7 @@ _CONFDELTYPES = { def table_exists(cr, tablename): """ Return whether the given table exists. """ - query = "SELECT 1 FROM information_schema.tables WHERE table_name=%s" + query = "SELECT 1 FROM pg_class WHERE relkind IN ('r', 'v', 'm') AND relname=%s" cr.execute(query, (tablename,)) return cr.rowcount |
