diff options
Diffstat (limited to 'django/db/backends/postgresql/introspection.py')
-rw-r--r-- | django/db/backends/postgresql/introspection.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/django/db/backends/postgresql/introspection.py b/django/db/backends/postgresql/introspection.py index d50f6eb9c2..7e7091a613 100644 --- a/django/db/backends/postgresql/introspection.py +++ b/django/db/backends/postgresql/introspection.py @@ -53,9 +53,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection): return field_type def get_table_list(self, cursor): - """ - Returns a list of table and view names in the current database. - """ + """Return a list of table and view names in the current database.""" cursor.execute(""" SELECT c.relname, c.relkind FROM pg_catalog.pg_class c @@ -68,7 +66,10 @@ class DatabaseIntrospection(BaseDatabaseIntrospection): if row[0] not in self.ignored_tables] def get_table_description(self, cursor, table_name): - "Returns a description of the table, with the DB-API cursor.description interface." + """ + Return a description of the table with the DB-API cursor.description + interface. + """ # As cursor.description does not return reliably the nullable property, # we have to query the information_schema (#7783) cursor.execute(""" @@ -87,7 +88,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection): def get_relations(self, cursor, table_name): """ - Returns a dictionary of {field_name: (field_name_other_table, other_table)} + Return a dictionary of {field_name: (field_name_other_table, other_table)} representing all relationships to the given table. """ cursor.execute(""" |