pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
CAST(ipaddress as text)   -- HOW?
3+ messages / 1 participants
[nested] [flat]

* CAST(ipaddress as text)   -- HOW?
@ 2001-07-17 14:05  Bhuvan A <bhuvansql@yahoo.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Bhuvan A @ 2001-07-17 14:05 UTC (permalink / raw)
  To: pgsql-sql


hi all,

how can we cast an ipaddress(type cidr) to any other type?

thankx in advance..


Regards,

Bhuvaneswar.




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: CAST(ipaddress as text) -- HOW?
@ 2001-07-18 09:23  Bhuvan A <bhuvansql@yahoo.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Bhuvan A @ 2001-07-18 09:23 UTC (permalink / raw)
  To: omid omoomi <oomoomi@hotmail.com>; +Cc: pgsql-sql


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@yahoo.com>
> >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.
> 




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: CAST(ipaddress as text) -- HOW?
@ 2001-07-21 05:58  Bhuvan A <bhuvansql@yahoo.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Bhuvan A @ 2001-07-21 05:58 UTC (permalink / raw)
  To: omid omoomi <oomoomi@hotmail.com>; +Cc: 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@yahoo.com>
> >To: omid omoomi <oomoomi@hotmail.com>
> >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 <bhuvansql@yahoo.com>
> > > >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
> 




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2001-07-21 05:58 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-07-17 14:05 CAST(ipaddress as text)   -- HOW? Bhuvan A <bhuvansql@yahoo.com>
2001-07-18 09:23 Re: CAST(ipaddress as text) -- HOW? Bhuvan A <bhuvansql@yahoo.com>
2001-07-21 05:58 Re: CAST(ipaddress as text) -- HOW? Bhuvan A <bhuvansql@yahoo.com>

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