Changes between Initial Version and Version 11 of Ticket #16468


Ignore:
Timestamp:
Oct 17, 2011, 3:21:54 PM (13 years ago)
Author:
Ramiro Morales
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16468

    • Property Easy pickings unset
    • Property Triage Stage UnreviewedDesign decision needed
    • Property Resolutionwontfix
    • Property Status newclosed
  • 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