Re: CAST(ipaddress as text) -- HOW?

From: Bhuvan A <bhuvansql(at)yahoo(dot)com>
To: omid omoomi <oomoomi(at)hotmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: CAST(ipaddress as text) -- HOW?
Date: 2001-07-21 05:58:52
Message-ID: Pine.LNX.4.20.0107211126100.4270-100000@Larry.bks
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


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 <bhuvansql(at)yahoo(dot)com>
> >To: omid omoomi <oomoomi(at)hotmail(dot)com>
> >CC: pgsql-sql(at)postgresql(dot)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 <bhuvansql(at)yahoo(dot)com>
> > > >To: pgsql-sql(at)postgresql(dot)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(at)postgresql(dot)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
>

Browse pgsql-sql by date

  From Date Subject
Next Message Fons Rave 2001-07-21 12:15:26 Re: Records exactly the same.
Previous Message Ed Yu 2001-07-21 05:50:57 Re: When PostgreSQL compliant JDBC 2.0?