Re: How to covert 'char' to 'inet'

From: mnihas(at)poczta(dot)onet(dot)pl (Michal O)
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to covert 'char' to 'inet'
Date: 2002-07-24 08:40:01
Message-ID: dc10011f.0207240040.4bb09b96@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thank you. What I did was:

inet(trim(both ' ' from server_ip::text))

and worked fine. Convertion to 'text' was needed.
Do you know how time consuming it is ? Is there more efficient way ?

Best regards
Michal Otroszczenko

> > I've tried cast to convert char to inet, but that is no good waw :((.
> > Does anybody know how to do that ?
>
> Try trim(charfield)::inet. Worked for me. I think the problem is
> that char is padded.
>
> A

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message stefan 2002-07-24 10:13:57 regression test
Previous Message Alessandro Baretta 2002-07-24 08:31:58 Re: just a quick one ...