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?
On 2009-08-09, 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? dunno if this will help. create function bigint_to_inet(bigint) returns inet as $$ select (($1>>24&255)||'.'||($1>>16&255)||'.'||($1>>8&255)||'.'||($1>>0&255))::inet $$ immutable language sql;
"Mindaugas G." <mindaugas@biovela.lt> writes: > 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? You might be interrested into the ip4r project: http://pgfoundry.org/projects/ip4r/ Regards, -- dim
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера