#33539: Missing space in SQL generated by PostgresIndex
----------------------------------+--------------------------------------
     Reporter:  Anders Kaseorg    |                    Owner:  (none)
         Type:  Bug               |                   Status:  new
    Component:  contrib.postgres  |                  Version:  3.2
     Severity:  Normal            |               Resolution:
     Keywords:                    |             Triage Stage:  Unreviewed
    Has patch:  1                 |      Needs documentation:  0
  Needs tests:  0                 |  Patch needs improvement:  0
Easy pickings:  1                 |                    UI/UX:  0
----------------------------------+--------------------------------------
Description changed by Anders Kaseorg:

Old description:

> 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`.
>
> Patch: https://github.com/django/django/pull/15459

New description:

 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.

--

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33539#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.0b9fc096e14fa9c531274b7f71fadbfa%40djangoproject.com.

Reply via email to