Re: [Django] #24169: ArrayField can't use __contained_by or __overlap queries for CharField

2015-01-20 Thread Django
#24169: ArrayField can't use __contained_by or __overlap queries for CharField
-+-
 Reporter:  joelburton   |Owner:  Marc
 |  Tamlyn 
 Type:  Bug  |   Status:  closed
Component:  contrib.postgres |  Version:  1.8alpha1
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Marc Tamlyn ):

 In [changeset:"c80b2144d22d29725cf4d584bfa9079dd35af064"]:
 {{{
 #!CommitTicketReference repository=""
 revision="c80b2144d22d29725cf4d584bfa9079dd35af064"
 [1.8.x] Fixes #24169 -- More arrayfield specific lookups.

 varchar()[] cannot compare itself to text[]

 Thanks to joelburton for the patch.

 Backport of 0ae94d0d31 from master
 }}}

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.622144e00fb8e3ac03aab4b660287aae%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24169: ArrayField can't use __contained_by or __overlap queries for CharField

2015-01-20 Thread Django
#24169: ArrayField can't use __contained_by or __overlap queries for CharField
-+-
 Reporter:  joelburton   |Owner:  Marc
 |  Tamlyn 
 Type:  Bug  |   Status:  closed
Component:  contrib.postgres |  Version:  1.8alpha1
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Marc Tamlyn ):

 * status:  new => closed
 * owner:   => Marc Tamlyn 
 * resolution:   => fixed


Comment:

 In [changeset:"0ae94d0d3127adabcb0afaf32fd5dbe47d74cd57"]:
 {{{
 #!CommitTicketReference repository=""
 revision="0ae94d0d3127adabcb0afaf32fd5dbe47d74cd57"
 Fixes #24169 -- More arrayfield specific lookups.

 varchar()[] cannot compare itself to text[]

 Thanks to joelburton for the patch.
 }}}

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.3a8b96e8be9781ec2a7da8eb1d5cf024%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24169: ArrayField can't use __contained_by or __overlap queries for CharField

2015-01-19 Thread Django
#24169: ArrayField can't use __contained_by or __overlap queries for CharField
--+-
 Reporter:  joelburton|Owner:
 Type:  Bug   |   Status:  new
Component:  contrib.postgres  |  Version:  1.8alpha1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+-
Changes (by timgraham):

 * type:  Uncategorized => Bug
 * stage:  Unreviewed => Accepted


Comment:

 Any chance you could send a pull request on GitHub? That makes it quite a
 bit easier to review the patch, run the tests, and merge it.

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.32eef5424a173d1acc9e16178880e881%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24169: ArrayField can't use __contained_by or __overlap queries for CharField

2015-01-17 Thread Django
#24169: ArrayField can't use __contained_by or __overlap queries for CharField
--+--
 Reporter:  joelburton|Owner:
 Type:  Uncategorized |   Status:  new
Component:  contrib.postgres  |  Version:  1.8alpha1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Changes (by joelburton):

 * needs_docs:   => 0
 * needs_tests:   => 0
 * needs_better_patch:   => 0


Old description:

> ArrayField's lookup.py uses the @> operator for __contains, the <@
> operator for __contained_by, and the && operator for __overlap.
>
> When the field uses CharField (Postgres' varchar()), __contains works,
> but __contained_by and __overlap do not, as Postgres does not define <@
> and && operators for an array of varchar[] (it does for text[]).
>
> __contains works because, in array.py, there is a custom lookup,
> "ArrayOverlap", the outputs a cast to cast the array query value to, say,
> "::varchar(10)[]"
>
> If there are similar custom lookups for __contained_by and __overlap,
> these then work.

New description:

 ArrayField's lookup.py uses the @> operator for !__contains, the <@
 operator for !__contained_by, and the && operator for !__overlap.

 When the field uses CharField (Postgres' varchar()), !__contains works,
 but !__contained_by and !__overlap do not, as Postgres does not define <@
 and && operators for an array of varchar[] (it does for text[]).

 !__contains works because, in array.py, there is a custom lookup,
 "ArrayOverlap", the outputs a cast to cast the array query value to, say,
 "::varchar(10)[]"

 If there are similar custom lookups for !__contained_by and !__overlap,
 these then work.

--

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.50fa7fd7b20f4b2c3adad49e3cc2341f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #24169: ArrayField can't use __contained_by or __overlap queries for CharField

2015-01-17 Thread Django
#24169: ArrayField can't use __contained_by or __overlap queries for CharField
--+---
 Reporter:  joelburton|  Owner:
 Type:  Uncategorized | Status:  new
Component:  contrib.postgres  |Version:  1.8alpha1
 Severity:  Normal|   Keywords:
 Triage Stage:  Unreviewed|  Has patch:  1
Easy pickings:  0 |  UI/UX:  0
--+---
 ArrayField's lookup.py uses the @> operator for __contains, the <@
 operator for __contained_by, and the && operator for __overlap.

 When the field uses CharField (Postgres' varchar()), __contains works, but
 __contained_by and __overlap do not, as Postgres does not define <@ and &&
 operators for an array of varchar[] (it does for text[]).

 __contains works because, in array.py, there is a custom lookup,
 "ArrayOverlap", the outputs a cast to cast the array query value to, say,
 "::varchar(10)[]"

 If there are similar custom lookups for __contained_by and __overlap,
 these then work.

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/053.b17aae814ca381d87eac0b1bc2ab240d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.