bigint to ipaddress

Started by Mindaugas G.over 16 years ago2 messagesgeneral
Jump to latest
#1Mindaugas G.
mindaugas@biovela.lt

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?

Attachments:

smime.p7sapplication/pkcs7-signature; name=smime.p7sDownload
#2Camilo Sperberg
unreal4u@chilehardware.com
In reply to: Mindaugas G. (#1)
Re: bigint to ipaddress

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@biovela.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/