X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 63E1954060 for ; Mon, 25 Apr 2005 15:47:39 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 72734-04 for ; Mon, 25 Apr 2005 18:47:38 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.207]) by svr1.postgresql.org (Postfix) with ESMTP id 465AA54057 for ; Mon, 25 Apr 2005 15:47:37 -0300 (ADT) Received: by wproxy.gmail.com with SMTP id 68so1877640wra for ; Mon, 25 Apr 2005 11:47:39 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Y0hDTiie69nO2DdanzGghHeq725G8j2OJhDehQ/yb9WuS5mjVBXAY7npUEtUVT0DWMXyeuIIzGWvnKyBdDiRFitRzi86nnDDWlH3c6ewGF+azUS/Lrh3uJ23/O0HDbIXkpYuy2r7aeptFhfGCvLNvnoOoUYo9b8mtmdYet+F5y8= Received: by 10.54.149.20 with SMTP id w20mr2039503wrd; Mon, 25 Apr 2005 11:46:37 -0700 (PDT) Received: by 10.54.139.6 with HTTP; Mon, 25 Apr 2005 11:46:37 -0700 (PDT) Message-ID: Date: Mon, 25 Apr 2005 14:46:37 -0400 From: Rob Casson Reply-To: Rob Casson To: pgsql-sql@postgresql.org Subject: searching cidr/inet arrays Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.398 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200504/374 X-Sequence-Number: 21267 i'm having trouble figuring out how to search in inet arrays....its been a long time since i used postgres array support, so i may just be bone-headed...... how can i determine if a given ip address is contained in the subnet declaration inside an array? {134.53.25.0/24,134.53.0.0/16} {134.53.24.0/24} i'd like to see which rows match an ip of, say, 134.53.24.2..... thanks in advance, and sorry if this is a faq....i've googled site:archives.postgresql.org, but haven't found my solution.....