Sorry for the imprecise description of the problem.

After some filtering statements (which I don't show here) I derive a
qs containing about 1000 objects.
With the following statement I try to filter the query further
new_qs = qs.filter(models.Q(myField__iregex="\\b%s\\b" % myString)
and new_qs comes to have 93 objects.
This happens locally where I'm running sqlite3.

In the production server (which I currently can't access, so I can't
compare the sql statements) I have the same database (except that I'm
using Postgresql 8.2).
The qs which I have before the "critical" filter statement contains
the same objects (about 1000 of them). After I apply the same
filtering I get a resulting qs which is empty. So no error message or
infinite loop. Just a different unexpected result.

I'm running the following django-version: 0.97-pre-SVN-6694

Do you have any suggestion on what could be wrong?

Thanks again
Francesco

On Nov 19, 1:52 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sun, 2007-11-18 at 12:46 -0800, cesco wrote:
> > Hi,
>
> > I have the following query which works perfectly with sqlite3:
>
> > from django.db import models
> > qs.filter(models.Q(myField__iregex="\\b%s\\b" % myString)
>
> > In the production server, where I'm running postgresql the exact same
> > query is not working.
>
> Once again it needs to be pointed out that "not working" is not a
> description of the problem. What does it mean? No result was returned?
> An error was raised (if so, what error)? The software went into an
> infinite loop?
>
> The standard way to describe a problem is (1) I did this, (2) This
> happened, (3) I expected this other thing to happen (in your case, you
> could show the corresponding output from SQLite).
>
> As a head start, try looking at the SQL generated by Django (if the
> query gets executed) and see if that gives you any idesa. See the FAQ if
> you don't know how to view the SQL.
>
> > Do you have any idea why this happens? Maybe a bug?
>
> > Note that I'm running the SVN (most recent) version of django.
>
> Again, in future, you'll probably want to report the actual subversion
> number (run "django-admin.py --version" or "svn info") because "most
> recent" is only relative to when you posted the message. You might
> already be a few changesets behind trunk by the time somebody reads your
> message, particularly if it takes a day or two.
>
> By all means post more information about your problem, but help us to
> help you by providing enough information for us to work with,
> particularly when it comes to describing your problem.
>
> Regards,
> Malcolm
>
> --
> How many of you believe in telekinesis? Raise my 
> hand...http://www.pointy-stick.com/blog/
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to