From: Dinesh Chandra 12108 <Dinesh.Chandra@cyient.com>
To: Rick Otten <rottenwindfish@gmail.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: vinny <vinny@xs4all.nl>
Cc: pgsql-performance-owner@postgresql.org <pgsql-performance-owner@postgresql.org>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Filter certain range of IP address.
Date: Fri, 7 Apr 2017 16:09:33 +0000
Message-ID: <3bd3bf63ae474b899a5dd127d668ccfe@cyient.com> (raw)
In-Reply-To: <CAMAYy4K_SJPJgZ9trUmkJhjnyY7rac0JDCDzhdDYZbL0foW5Ag@mail.gmail.com>
References: <cfb55df0df5547ccacef2b7390381bb3@cyient.com>
<9deae42ab489b5856f600ea514bcd51a@xs4all.nl>
<705a033c9efe4a75830cc76b154e18a0@cyient.com>
<CAKFQuwYVgCiUsDDHc9FjVCtsDttZHNjHnukWwFz3TFtZwAj=2Q@mail.gmail.com>
<CAMAYy4K_SJPJgZ9trUmkJhjnyY7rac0JDCDzhdDYZbL0foW5Ag@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
Thanks.
It’s working fine.
Thank you so much
Regards,
Dinesh Chandra
|Database administrator (Oracle/PostgreSQL)| Cyient Ltd. Noida.
------------------------------------------------------------------
Mobile: +91-9953975849 | Ext 1078 |dinesh.chandra@cyient.com<mailto:%7Cdinesh.chandra@cyient.com>
Plot No. 7, NSEZ, Phase-II ,Noida-Dadri Road, Noida - 201 305,India.
From: Rick Otten [mailto:rottenwindfish@gmail.com]
Sent: 07 April, 2017 9:26 PM
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Dinesh Chandra 12108 <Dinesh.Chandra@cyient.com>; vinny <vinny@xs4all.nl>; pgsql-performance-owner@postgresql.org; pgsql-performance@postgresql.org
Subject: Re: [PERFORM] Filter certain range of IP address.
On Fri, Apr 7, 2017 at 11:29 AM, David G. Johnston <david.g.johnston@gmail.com<mailto:david.g.johnston@gmail.com>> wrote:
On Fri, Apr 7, 2017 at 8:18 AM, Dinesh Chandra 12108 <Dinesh.Chandra@cyient.com<mailto:Dinesh.Chandra@cyient.com>> wrote:
Dear Vinny,
Thanks for your valuable replay.
but I need a select query, which select only that record which starts from IP "172.23.110" only from below table.
xxx 172.23.110.175
yyy 172.23.110.178
zzz 172.23.110.177
aaa 172.23.110.176
bbb 172.23.111.180
ccc 172.23.115.26
SELECT ... WHERE substring(ip_addr::text, 1, 10) = '172.23.110'
or
select ... where ip_addr << '172.23.110/32';
if ip_addr is an inet data type -- https://www.postgresql.org/docs/9.6/static/functions-net.html
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: Dinesh.Chandra@cyient.com, rottenwindfish@gmail.com, david.g.johnston@gmail.com, vinny@xs4all.nl, pgsql-performance-owner@postgresql.org
Subject: Re: Filter certain range of IP address.
In-Reply-To: <3bd3bf63ae474b899a5dd127d668ccfe@cyient.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox