Refs #27098 -- Removed unused introspection queries.
Unused since 578711c310
.
Thanks Ian Foote for finding this.
This commit is contained in:
parent
257fb0a7d0
commit
e01fa015c0
|
@ -19,26 +19,6 @@ class PostGISIntrospection(DatabaseIntrospection):
|
||||||
'raster_overviews',
|
'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):
|
def get_postgis_types(self):
|
||||||
"""
|
"""
|
||||||
Return a dictionary with keys that are the PostgreSQL object
|
Return a dictionary with keys that are the PostgreSQL object
|
||||||
|
|
|
@ -29,16 +29,6 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
|
||||||
|
|
||||||
ignored_tables = []
|
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):
|
def get_field_type(self, data_type, description):
|
||||||
field_type = super().get_field_type(data_type, description)
|
field_type = super().get_field_type(data_type, description)
|
||||||
if description.default and 'nextval' in description.default:
|
if description.default and 'nextval' in description.default:
|
||||||
|
|
Loading…
Reference in New Issue