Opened 4 years ago
Closed 4 years ago
#33539 closed Cleanup/optimization (fixed)
Missing space in SQL generated by PostgresIndex
| Reported by: | Anders Kaseorg | Owned by: | Anders Kaseorg |
|---|---|---|---|
| Component: | contrib.postgres | Version: | 3.2 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | yes | UI/UX: | no |
Description (last modified by )
If I define an index like
GinIndex("search_tsvector", fastupdate=False, name="zerver_message_search_tsvector")
the following output is generated by manage.py sqlmigrate:
CREATE INDEX "zerver_message_search_tsvector" ON "zerver_message" USING gin ("search_tsvector")WITH (fastupdate = off) ;
Note the missing space before WITH. It happens that it doesn’t affect the behavior since it follows ) (at least in all currently supported syntaxes), but it should be cleaned up anyway, so I submitted https://github.com/django/django/pull/15459.
Change History (6)
comment:1 by , 4 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 4 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:3 by , 4 years ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
| Type: | Bug → Cleanup/optimization |
comment:4 by , 4 years ago
| Needs tests: | set |
|---|
comment:5 by , 4 years ago
| Needs tests: | unset |
|---|---|
| Triage Stage: | Accepted → Ready for checkin |
comment:6 by , 4 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
In 7f4fc5c: