mattiaslinnap / django-partial-index

PostgreSQL and SQLite partial index support for Django
BSD 3-Clause "New" or "Revised" License
116 stars 12 forks source link

Using a where clause compring field to string #11

Closed mwolff44 closed 6 years ago

mwolff44 commented 6 years ago

Hi, I want to create a partial index with postgresql, but in my where clause, i need to compare a field to a char. I get an error . Example : PartialIndex(fields=['id', 'rc_type'], unique=False, where_postgresql='status = "enabled"')

django.db.utils.ProgrammingError: column "enabled" does not exist LINE 1: ...N "table" ("id", "rc_type") WHERE status = "enabled"

Thanks for your help

mwolff44 commented 6 years ago

Sorry, i found the issue