[2.1.x] Refs #27098 -- Removed unused introspection queries.

Unused since 578711c310.

Thanks Ian Foote for finding this.
Backport of e01fa015c0 from master
This commit is contained in:
Markus Holtermann 2018-05-26 16:29:02 +02:00 committed by Mariusz Felisiak
parent a295666d37
commit 40d8768158
2 changed files with 0 additions and 30 deletions

View File

@ -19,26 +19,6 @@ class PostGISIntrospection(DatabaseIntrospection):
'raster_overviews',
]
# Overridden from parent to include raster indices in retrieval.
# Raster indices have pg_index.indkey value 0 because they are an
# expression over the raster column through the ST_ConvexHull function.
# So the default query has to be adapted to include raster indices.
_get_indexes_query = """
SELECT DISTINCT attr.attname, idx.indkey, idx.indisunique, idx.indisprimary
FROM pg_catalog.pg_class c, pg_catalog.pg_class c2, pg_catalog.pg_index idx,
pg_catalog.pg_attribute attr, pg_catalog.pg_type t
WHERE
c.oid = idx.indrelid
AND idx.indexrelid = c2.oid
AND attr.attrelid = c.oid
AND t.oid = attr.atttypid
AND (
attr.attnum = idx.indkey[0] OR
(t.typname LIKE 'raster' AND idx.indkey = '0')
)
AND attr.attnum > 0
AND c.relname = %s"""
def get_postgis_types(self):
"""
Return a dictionary with keys that are the PostgreSQL object

View File

@ -29,16 +29,6 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
ignored_tables = []
_get_indexes_query = """
SELECT attr.attname, idx.indkey, idx.indisunique, idx.indisprimary
FROM pg_catalog.pg_class c, pg_catalog.pg_class c2,
pg_catalog.pg_index idx, pg_catalog.pg_attribute attr
WHERE c.oid = idx.indrelid
AND idx.indexrelid = c2.oid
AND attr.attrelid = c.oid
AND attr.attnum = idx.indkey[0]
AND c.relname = %s"""
def get_field_type(self, data_type, description):
field_type = super().get_field_type(data_type, description)
if description.default and 'nextval' in description.default: