Re: [Django] #20271: PostgreSQL error: No operator matches the given name and argument type(s). You might need to add explicit type casts.

2015-10-02 Thread Django
#20271: PostgreSQL error: No operator matches the given name and argument 
type(s).
You might need to add explicit type casts.
-+-
 Reporter:  arctelix@…   |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  duplicate
 Keywords:  postgresql, pk   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

 * status:  new => closed
 * resolution:   => duplicate


Comment:

 Looks like a duplicate of #16055.

--
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/076.591020408cc7bc63b92dd9906483547d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #20271: PostgreSQL error: No operator matches the given name and argument type(s). You might need to add explicit type casts.

2015-06-29 Thread Django
#20271: PostgreSQL error: No operator matches the given name and argument 
type(s).
You might need to add explicit type casts.
-+-
 Reporter:  arctelix@…   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  postgresql, pk   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Shanto):

 * cc: shanto@… (added)


--
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/076.6b9fdfa7718c4402251254900181e77a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #20271: PostgreSQL error: No operator matches the given name and argument type(s). You might need to add explicit type casts.

2015-06-29 Thread Django
#20271: PostgreSQL error: No operator matches the given name and argument 
type(s).
You might need to add explicit type casts.
-+-
 Reporter:  arctelix@…   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  postgresql, pk   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by timgraham:

Old description:

> It seems this error is still around!
>
> Traceback (most recent call last):
>
>   File "/app/.heroku/src/django-tastypie/tastypie/resources.py", line
> 202, in wrapper
> response = callback(request, *args, **kwargs)
>
>   File "/app/.heroku/src/django-tastypie/tastypie/resources.py", line
> 441, in dispatch_list
> return self.dispatch('list', request, **kwargs)
>
>   File "/app/.heroku/src/django-tastypie/tastypie/resources.py", line
> 473, in dispatch
> response = method(request, **kwargs)
>
>   File "/app/.heroku/src/django-tastypie/tastypie/resources.py", line
> 1244, in get_list
> to_be_serialized = paginator.page()
>
>   File "/app/.heroku/src/django-tastypie/tastypie/paginator.py", line
> 186, in page
> count = self.get_count()
>
>   File "/app/.heroku/src/django-tastypie/tastypie/paginator.py", line
> 118, in get_count
> return self.objects.count()
>
>   File "/app/.heroku/python/lib/python2.7/site-
> packages/django/db/models/query.py", line 351, in count
> return self.query.get_count(using=self.db)
>
>   File "/app/.heroku/python/lib/python2.7/site-
> packages/django/db/models/sql/query.py", line 418, in get_count
> number = obj.get_aggregation(using=using)[None]
>
>   File "/app/.heroku/python/lib/python2.7/site-
> packages/django/db/models/sql/query.py", line 384, in get_aggregation
> result = query.get_compiler(using).execute_sql(SINGLE)
>
>   File "/app/.heroku/python/lib/python2.7/site-
> packages/django/db/models/sql/compiler.py", line 818, in execute_sql
> cursor.execute(sql, params)
>
>   File "/app/.heroku/python/lib/python2.7/site-
> packages/django/db/backends/postgresql_psycopg2/base.py", line 52, in
> execute
> return self.cursor.execute(query, args)
>
> DatabaseError: operator does not exist: integer = text LINE 1: ... INNER
> JOIN "django_comments" ON ("pins_pin"."id" = "django_...
>  ^
> HINT:  No operator matches the given name and argument type(s). You might
> need to add explicit type casts.

New description:

 It seems this error is still around!
 {{{
 Traceback (most recent call last):

   File "/app/.heroku/src/django-tastypie/tastypie/resources.py", line 202,
 in wrapper
 response = callback(request, *args, **kwargs)

   File "/app/.heroku/src/django-tastypie/tastypie/resources.py", line 441,
 in dispatch_list
 return self.dispatch('list', request, **kwargs)

   File "/app/.heroku/src/django-tastypie/tastypie/resources.py", line 473,
 in dispatch
 response = method(request, **kwargs)

   File "/app/.heroku/src/django-tastypie/tastypie/resources.py", line
 1244, in get_list
 to_be_serialized = paginator.page()

   File "/app/.heroku/src/django-tastypie/tastypie/paginator.py", line 186,
 in page
 count = self.get_count()

   File "/app/.heroku/src/django-tastypie/tastypie/paginator.py", line 118,
 in get_count
 return self.objects.count()

   File "/app/.heroku/python/lib/python2.7/site-
 packages/django/db/models/query.py", line 351, in count
 return self.query.get_count(using=self.db)

   File "/app/.heroku/python/lib/python2.7/site-
 packages/django/db/models/sql/query.py", line 418, in get_count
 number = obj.get_aggregation(using=using)[None]

   File "/app/.heroku/python/lib/python2.7/site-
 packages/django/db/models/sql/query.py", line 384, in get_aggregation
 result = query.get_compiler(using).execute_sql(SINGLE)

   File "/app/.heroku/python/lib/python2.7/site-
 packages/django/db/models/sql/compiler.py", line 818, in execute_sql
 cursor.execute(sql, params)

   File "/app/.heroku/python/lib/python2.7/site-
 packages/django/db/backends/postgresql_psycopg2/base.py", line 52, in
 execute
 return self.cursor.execute(query, args)

 DatabaseError: operator does not exist: integer = text LINE 1: ... INNER
 JOIN "django_comments" ON ("pins_pin"."id" = "django_...
  ^
 HINT:  No operator matches the given name and argument type(s). You might
 need to add ex

Re: [Django] #20271: PostgreSQL error: No operator matches the given name and argument type(s). You might need to add explicit type casts.

2015-06-29 Thread Django
#20271: PostgreSQL error: No operator matches the given name and argument 
type(s).
You might need to add explicit type casts.
-+-
 Reporter:  arctelix@…   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  postgresql, pk   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by charettes):

 * status:  closed => new
 * resolution:  needsinfo =>


--
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/076.20a0a37564cadc0c2acf9df1cca73325%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #20271: PostgreSQL error: No operator matches the given name and argument type(s). You might need to add explicit type casts.

2015-06-29 Thread Django
#20271: PostgreSQL error: No operator matches the given name and argument 
type(s).
You might need to add explicit type casts.
-+-
 Reporter:  arctelix@…   |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  postgresql, pk   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by charettes):

 * version:  1.4 => master
 * stage:  Unreviewed => Accepted


Comment:

 Managed to reproduce with the provided patch against master.

 As Anssi said this looks hard to fix but I'm tentatively accepting.

--
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/076.3523e47475a163b71d9800283e6ea740%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #20271: PostgreSQL error: No operator matches the given name and argument type(s). You might need to add explicit type casts.

2015-06-29 Thread Django
#20271: PostgreSQL error: No operator matches the given name and argument 
type(s).
You might need to add explicit type casts.
-+-
 Reporter:  arctelix@…   |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  1.4
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  postgresql, pk   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Shanto):

 * Attachment "generic_relations_regress-test_textlink_join.patch" added.


--
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/076.d767c9364040da28367918bdcfc3f663%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #20271: PostgreSQL error: No operator matches the given name and argument type(s). You might need to add explicit type casts.

2013-06-16 Thread Django
#20271: PostgreSQL error: No operator matches the given name and argument 
type(s).
You might need to add explicit type casts.
-+-
 Reporter:  arctelix@…   |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  1.4
  (models, ORM)  |   Resolution:  needsinfo
 Severity:  Normal   | Triage Stage:
 Keywords:  postgresql, pk   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by akaariai):

 * status:  new => closed
 * resolution:   => needsinfo


Comment:

 I think I will need to close this as needsinfo. I can't reproduce this,
 and until there is a way to reproduce this there is little we can do to
 fix anything. The other option is to mark this as accepted without any way
 to actually do anything to the ticket. So, picking what I assume to be
 lesser of the two evils...

-- 
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/076.0c42b0e278b47df0ea229eae89431491%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #20271: PostgreSQL error: No operator matches the given name and argument type(s). You might need to add explicit type casts.

2013-06-16 Thread Django
#20271: PostgreSQL error: No operator matches the given name and argument 
type(s).
You might need to add explicit type casts.
-+-
 Reporter:  arctelix@…   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.4
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:  postgresql, pk   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by akaariai):

 Could you produce a test case using standard django models?

 I think the problem is that there is need for casting the id to text in
 the join condition, so that object_id and the id field's types match. This
 doesn't seem to be easy to do, as currently only direct = conditions in
 joins are supported.

-- 
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/076.834345cc6f701bd27d8b2ebb9547d492%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #20271: PostgreSQL error: No operator matches the given name and argument type(s). You might need to add explicit type casts.

2013-04-17 Thread Django
#20271: PostgreSQL error: No operator matches the given name and argument 
type(s).
You might need to add explicit type casts.
-+-
 Reporter:  arctelix@…   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.4
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:  postgresql, pk   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by arctelix@…):

 I managed to work around the limitation caused by the object_id in django-
 comments being a text field as follows:


 {{{
 if 'cmnts' in filters:
 comments = Comment.objects.filter(user__id=filters['cmnts'],
 content_type__name = 'my',   site_id=settings.SITE_ID
 ).values_list('object_pk', flat=True)
 comments = [int(c) for c in comments]
 orm_filters['pk__in'] = comments
 }}}

 However, it would be great if django implimented someting similar to what
 has been done here:
 https://github.com/coleifer/django-generic-
 aggregation/blob/master/generic_aggregation/utils.py

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #20271: PostgreSQL error: No operator matches the given name and argument type(s). You might need to add explicit type casts.

2013-04-16 Thread Django
#20271: PostgreSQL error: No operator matches the given name and argument 
type(s).
You might need to add explicit type casts.
-+-
 Reporter:  arctelix@…   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.4
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:  postgresql, pk   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by arctelix@…):

 * status:  closed => new
 * resolution:  needsinfo =>


Comment:

 Also the query set for the comment resource is: queryset =
 Comment.objects.all()

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #20271: PostgreSQL error: No operator matches the given name and argument type(s). You might need to add explicit type casts.

2013-04-16 Thread Django
#20271: PostgreSQL error: No operator matches the given name and argument 
type(s).
You might need to add explicit type casts.
-+-
 Reporter:  arctelix@…   |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  1.4
  (models, ORM)  |   Resolution:  needsinfo
 Severity:  Normal   | Triage Stage:
 Keywords:  postgresql, pk   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by arctelix@…):

 The issue seems identical to https://code.djangoproject.com/ticket/6523.
 I am using the latest build of tastypie & using heroku postgreSQL The code
 that generates the error is in one of my my api resources.  The error is
 generated by the line:


 {{{
 orm_filters['comments__user__id__exact'] = filters['cmnts']
 }}}

 In the below code:

 {{{
 class PinResource(ModelResource):

 comments = fields.ToManyField('pinry.api.api.CmntResource',
 'comments', full=True, null=True)

 def build_filters(self, filters=None):
 if filters is None:
 filters = {}

 orm_filters = super(PinResource, self).build_filters(filters)

 if 'cmnts' in filters:
 orm_filters['comments__user__id__exact'] = filters['cmnts']

 class CmntResource(ModelResource):
 user = fields.ToOneField('my.api.api.UserResource', 'user', full=True)
 site_id = fields.CharField(attribute = 'site_id')
 content_object = GenericForeignKeyField({
 Pin: PinResource,
 }, 'content_object')
 username = fields.CharField(attribute = 'user__username', null=True)
 user_id = fields.CharField(attribute = 'user__id', null=True)
 }}}

 The CommentResource is based on the built in django-comments model.  It
 apears the error is due to the fact that the object_pk is defined as
 models.TextField(_('object ID')) in the model and PostgreSQL requires it
 to be cast as in integer since the commented object's pk is an integer.

 Let me know if you need more.

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #20271: PostgreSQL error: No operator matches the given name and argument type(s). You might need to add explicit type casts.

2013-04-16 Thread Django
#20271: PostgreSQL error: No operator matches the given name and argument 
type(s).
You might need to add explicit type casts.
-+-
 Reporter:  arctelix@…   |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  1.4
  (models, ORM)  |   Resolution:  needsinfo
 Severity:  Normal   | Triage Stage:
 Keywords:  postgresql, pk   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by russellm):

 * status:  new => closed
 * needs_better_patch:   => 0
 * resolution:   => needsinfo
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 It's difficult to fix "This error" if you don't tell us what "this error"
 is. A stack trace by itself doesn't help - we need sample code and/or an
 explanation to demonstrate how to reproduce the problem.

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[Django] #20271: PostgreSQL error: No operator matches the given name and argument type(s). You might need to add explicit type casts.

2013-04-16 Thread Django
#20271: PostgreSQL error: No operator matches the given name and argument 
type(s).
You might need to add explicit type casts.
--+
 Reporter:  arctelix@…|  Owner:  nobody
 Type:  Bug   | Status:  new
Component:  Database layer (models, ORM)  |Version:  1.4
 Severity:  Normal|   Keywords:  postgresql, pk
 Triage Stage:  Unreviewed|  Has patch:  0
Easy pickings:  0 |  UI/UX:  0
--+
 It seems this error is still around!

 Traceback (most recent call last):

   File "/app/.heroku/src/django-tastypie/tastypie/resources.py", line 202,
 in wrapper
 response = callback(request, *args, **kwargs)

   File "/app/.heroku/src/django-tastypie/tastypie/resources.py", line 441,
 in dispatch_list
 return self.dispatch('list', request, **kwargs)

   File "/app/.heroku/src/django-tastypie/tastypie/resources.py", line 473,
 in dispatch
 response = method(request, **kwargs)

   File "/app/.heroku/src/django-tastypie/tastypie/resources.py", line
 1244, in get_list
 to_be_serialized = paginator.page()

   File "/app/.heroku/src/django-tastypie/tastypie/paginator.py", line 186,
 in page
 count = self.get_count()

   File "/app/.heroku/src/django-tastypie/tastypie/paginator.py", line 118,
 in get_count
 return self.objects.count()

   File "/app/.heroku/python/lib/python2.7/site-
 packages/django/db/models/query.py", line 351, in count
 return self.query.get_count(using=self.db)

   File "/app/.heroku/python/lib/python2.7/site-
 packages/django/db/models/sql/query.py", line 418, in get_count
 number = obj.get_aggregation(using=using)[None]

   File "/app/.heroku/python/lib/python2.7/site-
 packages/django/db/models/sql/query.py", line 384, in get_aggregation
 result = query.get_compiler(using).execute_sql(SINGLE)

   File "/app/.heroku/python/lib/python2.7/site-
 packages/django/db/models/sql/compiler.py", line 818, in execute_sql
 cursor.execute(sql, params)

   File "/app/.heroku/python/lib/python2.7/site-
 packages/django/db/backends/postgresql_psycopg2/base.py", line 52, in
 execute
 return self.cursor.execute(query, args)

 DatabaseError: operator does not exist: integer = text LINE 1: ... INNER
 JOIN "django_comments" ON ("pins_pin"."id" = "django_...
  ^
 HINT:  No operator matches the given name and argument type(s). You might
 need to add explicit type casts.

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.