From: | Dinesh Chandra 12108 <Dinesh(dot)Chandra(at)cyient(dot)com> |
---|---|
To: | Rick Otten <rottenwindfish(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | vinny <vinny(at)xs4all(dot)nl>, "pgsql-performance-owner(at)postgresql(dot)org" <pgsql-performance-owner(at)postgresql(dot)org>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: Filter certain range of IP address. |
Date: | 2017-04-07 16:09:33 |
Message-ID: | 3bd3bf63ae474b899a5dd127d668ccfe@cyient.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-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(dot)chandra(at)cyient(dot)com<mailto:%7Cdinesh(dot)chandra(at)cyient(dot)com>
Plot No. 7, NSEZ, Phase-II ,Noida-Dadri Road, Noida - 201 305,India.
From: Rick Otten [mailto:rottenwindfish(at)gmail(dot)com]
Sent: 07 April, 2017 9:26 PM
To: David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Dinesh Chandra 12108 <Dinesh(dot)Chandra(at)cyient(dot)com>; vinny <vinny(at)xs4all(dot)nl>; pgsql-performance-owner(at)postgresql(dot)org; pgsql-performance(at)postgresql(dot)org
Subject: Re: [PERFORM] Filter certain range of IP address.
On Fri, Apr 7, 2017 at 11:29 AM, David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com<mailto:david(dot)g(dot)johnston(at)gmail(dot)com>> wrote:
On Fri, Apr 7, 2017 at 8:18 AM, Dinesh Chandra 12108 <Dinesh(dot)Chandra(at)cyient(dot)com<mailto:Dinesh(dot)Chandra(at)cyient(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Moreno Andreo | 2017-04-07 16:20:04 | Re: Filter certain range of IP address. |
Previous Message | Rick Otten | 2017-04-07 15:56:18 | Re: Filter certain range of IP address. |