Received: from Donald.bks ([203.145.133.16]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f6L60fa95518 for ; Sat, 21 Jul 2001 02:00:42 -0400 (EDT) (envelope-from bhuvansql@yahoo.com) Received: from Larry.bks (root@Larry.bks [200.2.1.10]) by Donald.bks (8.11.2/8.11.2) with ESMTP id f6L69sE18590; Sat, 21 Jul 2001 11:40:00 +0530 Received: from localhost (bhuvan@localhost) by Larry.bks (8.9.3/8.8.5) with ESMTP id LAA05340; Sat, 21 Jul 2001 11:28:53 +0530 X-Authentication-Warning: Larry.bks: bhuvan owned process doing -bs Date: Sat, 21 Jul 2001 11:28:52 +0530 (IST) From: Bhuvan A X-Sender: bhuvan@Larry.bks To: omid omoomi cc: pgsql-sql@postgresql.org Subject: Re: CAST(ipaddress as text) -- HOW? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200107/295 X-Sequence-Number: 4098 hi ipaddr::text I got it! few among the many ways are SELECT * FROM .. WHERE CAST(ipaddr::inet as text) ~ '200'; SELECT * FROM .. WHERE text(ipaddr::inet) ~ '200'; SELECT * FROM .. WHERE host(ipaddr::inet) ~ '200'; Regards, Bhuvaneswar. On Thu, 19 Jul 2001, omid omoomi wrote: > Sorry friend, you are right. I could not do that too. :o > I'll look for it. > omid > > >From: Bhuvan A > >To: omid omoomi > >CC: pgsql-sql@postgresql.org > >Subject: Re: [SQL] CAST(ipaddress as text) -- HOW? > >Date: Wed, 18 Jul 2001 14:53:04 +0530 (IST) > > > > > >hi, > > > >ipaddress::text > > > >is resulting in > > > >ERROR: Cannot cast type 'cidr' to 'text' > > > >how else we can??? > > > > > >Thankx. > > > > > >On Tue, 17 Jul 2001, omid omoomi wrote: > > > > > ie, > > > ipaddrss::text > > > > > > >From: Bhuvan A > > > >To: pgsql-sql@postgresql.org > > > >Subject: [SQL] CAST(ipaddress as text) -- HOW? > > > >Date: Tue, 17 Jul 2001 19:35:53 +0530 (IST) > > > > > > > > > > > >hi all, > > > > > > > >how can we cast an ipaddress(type cidr) to any other type? > > > > > > > >thankx in advance.. > > > > > > > > > > > >Regards, > > > > > > > >Bhuvaneswar. > > > > > > > > > > > >---------------------------(end of > >broadcast)--------------------------- > > > >TIP 3: if posting/reading through Usenet, please send an appropriate > > > >subscribe-nomail command to majordomo@postgresql.org so that your > > > >message can get through to the mailing list cleanly > > > > > > > >_________________________________________________________________________ > > > Get Your Private, Free E-mail from MSN Hotmail at > >http://www.hotmail.com. > > > > > > > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp >