Difference between inet and cidr

From: Yan Cheng CHEOK <yccheok(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Difference between inet and cidr
Date: 2011-07-05 06:50:53
Message-ID: 1309848653.43477.YahooMailClassic@web65703.mail.ac4.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

May I know what is the difference among cidr and inet? I read through Network Address Type (http://www.postgresql.org/docs/8.3/static/datatype-net-types.html)
"""The essential difference between inet and cidr data types is that inet accepts values with nonzero bits to the right of the netmask, whereas cidr does not."""
I understand what is Subnet Mask from http://en.wikipedia.org/wiki/Subnetwork. But, what does it mean by "nonzero bits to the right of the netmask"? Is there any example to show the difference among the 2?
If I provide the following input 1.2.3.4, this is what I am getting if I view through pgAdmin.
inet = 1.2.3.4cidr = 1.2.3.4/32

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2011-07-05 06:55:19 Re: Finding latest record for a number of groups in an INSERT-only table
Previous Message Bryan Henderson 2011-07-05 01:40:07 No space left on device log message storm