Re: bigint to ipaddress

From: Camilo Sperberg <unreal4u(at)chilehardware(dot)com>
To: "Mindaugas G(dot)" <mindaugas(at)biovela(dot)lt>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: bigint to ipaddress
Date: 2009-08-09 12:42:23
Message-ID: f05190a90908090542w3840abd6w430d0dfae2995b1b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

There is no such thing as converting a bigint into an text ip address,
unless you make it xD Google for "postgres INET_ATON" (INET_ATON is mysql's
ip-to-int)

However, there are datatypes in postgres which allow you to work directly
with ips and networks:
http://www.postgresql.org/docs/7.4/interactive/datatype-net-types.html

Greetings ;)

On Sun, Aug 9, 2009 at 05:44, Mindaugas G. <mindaugas(at)biovela(dot)lt> wrote:

> Hi,
>
> googling few days with no success,
> for example I have db with ip_src etc ant its data type bigint,
> how must look select query what I can see ip address (int) instead of
> bigint?
>
>

--
Mailed by:
UnReAl4U - unreal4u
ICQ #: 54472056
www: http://www.chw.net/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kobus Wolvaardt 2009-08-09 15:53:44 Postgres memory question
Previous Message Abraham, Danny 2009-08-09 12:37:42 Re: PG fails on Windows Server 2008: could not reattach to shared memory ... : 487