On Mon, Nov 2, 2009 at 5:14 PM, Bill Freeman <ke1g...@gmail.com> wrote:
> > It occurs to me that the ORM could fix this. It knows that status is > a CharField. For anything but None (which it should try to store as > null) it should be reasonable to apply str() (or unicode()) to the > field value before storing it. str(8) -> '8' (and unicode(8) -> > u'8'), while str() applied to a string (or unicode() applied to a > unicode string) leaves it unchanged (doesn't even copy in, in a few > quick tests in python 2.6.2). Then the backend will know to quote it. > > Thoughts? Workaround suggestions? > > I believe this issue came up when the PostgreSQL version that made the change first came out. http://code.djangoproject.com/ticket/6523 made some change to help, although I don't recall exactly what was done. You probably want to look at that and the discussions linked form that ticket (I have a vague feeling there might have been other tickets) to get a feel for the history of the change PostgreSQL made and what was ultimately changed in Django to help adjust. I have a vague feeling that at the time there was not much support for continuing to allow apps to compare apples to oranges willy-nilly after PostgreSQL itself decided to be more strict about the matter, but I don't use PostgreSQL much myself so don't have a good feel for how things ultimately turned out. Karen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---