Changes between Initial Version and Version 11 of Ticket #16468


Ignore:
Timestamp:
10/17/2011 03:21:54 PM (4 years ago)
Author:
ramiro
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16468

    • Property Status changed from new to closed
    • Property Patch needs improvement unset
    • Property Needs tests unset
    • Property Easy pickings unset
    • Property Needs documentation unset
    • Property Resolution changed from to wontfix
    • Property Triage Stage changed from Unreviewed to Design decision needed
  • Ticket #16468 – Description

    initial v11  
    44
    55When I use django to get all records with an IP address which has a CIDR notation it issues the following SQL statement (abbreviated):
     6{{{
    67SELECT ..blah.. FROM "x" WHERE (HOST("x"."target") = E'192.168.1.1/28' )
     8}}}
    79This is comparing a HOST to a string, and it returns 0 results even though there are several entries in the database. It returns the correct results when I alter the query and run it through my postgresql shell:
     10{{{
    811SELECT ..blah.. FROM "x" WHERE (HOST("x"."target") = HOST('192.168.1.1/28') )
    9 
     12}}}
    1013In short (at least on Postgresql) any data being compared against a IPAddressField should be cast to a HOST instead of a string.
Back to Top