Skip site navigation (1) Skip section navigation (2)

BUG #4277: Feature request inet type cast numeric values

From: "x" <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #4277: Feature request inet type cast numeric values
Date: 2008-07-01 15:20:49
Message-ID: 200807011520.m61FKnfU091407@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      4277
Logged by:          x
Email address:      noreply(at)postgresql(dot)org
PostgreSQL version: n/a
Operating system:   n/a
Description:        Feature request inet type cast numeric values
Details: 

SELECT inet 2130706433;

Should return:
?column?
--------
127.0.0.1

This would emulate the functionality:
CREATE OR REPLACE FUNCTION inet_ntoa(bigint) RETURNS text AS '
SELECT (($1>>24) & 255::int8) || ''.'' ||
(($1>>16) & 255::int8) || ''.'' ||
(($1>>8) & 255::int8) || ''.'' ||
($1 & 255::int8) as result
'
LANGUAGE 'SQL';

Responses

pgsql-bugs by date

Next:From: Heikki LinnakangasDate: 2008-07-01 15:53:24
Subject: Re: BUG #4277: Feature request inet type cast numeric values
Previous:From: Tom LaneDate: 2008-07-01 14:32:36
Subject: Re: BUG #4275: Multicolumn subquery expression not allowed on both sides of IS DISTINCT FROM

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group