From 32d5c39016f7f14dfc19142d78d944d92eb9cd70 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Fri, 8 Aug 2008 20:09:53 +0000 Subject: Fixed #6523 -- Use the correct cast on field types for PostgreSQL when searching within a field column (e.g. "like", "contains", etc). Required for PostgreSQL 8.3. Thanks to Dan Watson for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8242 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/modeltests/lookup/models.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') diff --git a/tests/modeltests/lookup/models.py b/tests/modeltests/lookup/models.py index 3261a678d6..1d39e0e22b 100644 --- a/tests/modeltests/lookup/models.py +++ b/tests/modeltests/lookup/models.py @@ -34,6 +34,12 @@ __test__ = {'API_TESTS':r""" >>> a7 = Article(headline='Article 7', pub_date=datetime(2005, 7, 27)) >>> a7.save() +# text matching tests for PostgreSQL 8.3 +>>> Article.objects.filter(id__iexact='1') +[] +>>> Article.objects.filter(pub_date__startswith='2005') +[, , , , , , ] + # Each QuerySet gets iterator(), which is a generator that "lazily" returns # results using database-level iteration. >>> for a in Article.objects.iterator(): -- cgit v1.3