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 Anders Kaseorg)

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 (1)

comment:1 by Anders Kaseorg, 3 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top