Received: from nts1.rtp.epa.gov (nts1.rtp.epa.gov [134.67.208.208]) by hub.org (8.9.3/8.9.3) with ESMTP id NAA88699 for ; Sat, 29 Jan 2000 13:55:34 -0500 (EST) (envelope-from volpe.mark@epamail.epa.gov) Received: from epamail.epa.gov (IDENT:mvs@wolfpack.rtpnc.epa.gov [134.67.136.18]) by nts1.rtp.epa.gov (8.9.3/8.9.3) with ESMTP id NAA29875 for ; Sat, 29 Jan 2000 13:58:31 -0500 (EST) Sender: mvs@nts1.rtp.epa.gov Message-ID: <389337A7.3F02B63B@epamail.epa.gov> Date: Sat, 29 Jan 2000 13:55:35 -0500 From: Mark Volpe X-Mailer: Mozilla 4.7 [en] (X11; U; Linux 2.2.9-27mdk i586) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: inet/cidr - can this be done? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Is there a way to convert inet types to cidr? I have a table with an inet field, and it would be cool to, say, group by class C network. My little attempt here results in an error: CREATE TABLE test(ip inet); INSERT INTO test VALUES('192.168.1.2'); SELECT (host(ip) || '/24')::cidr FROM test; ERROR: No such function 'cidr' with the specified attributes Thanks in advance - Mark