Opened 3 years ago
Last modified 3 years ago
#33539 closed Cleanup/optimization
Missing space in SQL generated by PostgresIndex — at Version 1
Reported by: | Anders Kaseorg | Owned by: | |
---|---|---|---|
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.