[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-admin
Subject:    Re: [ADMIN] A question on using CIDR datatype for both ipv6 and ipv4 address
From:       Tom Lane <tgl () sss ! pgh ! pa ! us>
Date:       2011-07-28 23:58:01
Message-ID: 9134.1311897481 () sss ! pgh ! pa ! us
[Download RAW message or body]

Dhaval Shah <dhaval.shah.m@gmail.com> writes:
> Let me know why I am not getting similar results when the RHS is an
> IPV4 in IPV6 format vs, the RHS in IPV4 format.

AFAIR, the inet/cidr types consider IPv4 to be an independent set of
values that sort in front of all IPv6 values.  The notion that IPv4
might be embedded in some part of the IPv6 space is not something that
that code is aware of.  If it did try to do that, you'd have
'::ffff:192.0.2.124' comparing as equal to '192.0.2.124', which would
be okay for some purposes but not all.

			regards, tom lane

-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic