(self)
| 17 | class PostgresIndex(CheckPostgresInstalledMixin, Index): |
| 18 | @cached_property |
| 19 | def max_name_length(self): |
| 20 | # Allow an index name longer than 30 characters when the suffix is |
| 21 | # longer than the usual 3 character limit. The 30 character limit for |
| 22 | # cross-database compatibility isn't applicable to PostgreSQL-specific |
| 23 | # indexes. |
| 24 | return Index.max_name_length - len(Index.suffix) + len(self.suffix) |
| 25 | |
| 26 | def create_sql(self, model, schema_editor, using="", **kwargs): |
| 27 | self.check_supported(schema_editor) |
no outgoing calls