> Would you be able to support partial indexes as well?

I am not sure if I would be able to squash it in my GSOC timeline, but yes, 
I will definitely incorporate it (afterwards, if not during my GSOC). It 
should not be very hard to implement once I am able to make functional 
indexes work.

            Index('field1', 'field2', name='some_index_across_two_columns'),
I think you meant ['field1', 'field2'] here.


> Index(...) would create one index from my perspective. Thus 
> Index('field_a', 'field_b') would do the same as 
> index_together=(('field_a', 'field_b'),) these days.
> Index(['f1', 'f2', ['f3', 'f4']]) looks way to confusing to me. That would 
> probably be better Index('f1'), Index('f2'), Index('f3', 'f4')
>
Yes, I had thought more about it after my last reply and reached the same 
conclusion. It would best if the indexes looked like -
           Index(['f1', 'f2']) # multi-column indexing.
           Index(['f1'], name='name_idx', type=models.Hash) # single-column 
hash type indexing.
There's no need to make it more complicated.


> Since we're talking about index_together, please keep unique_together in 
> mind ;)
>
unique_together is a whole another independent thing. It is the `ALTER 
TABLE <table_name> ADD CONSTRAINT` thing and is not required to be mixed 
with the `CREATE INDEX` things, IMO, unless I am missing something.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/8521e120-1096-4cf0-beb6-9d5b5bdbbc85%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to