Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Bugs > Re: BUG #4277: ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 3 Topic 3890 of 4088
Post > Topic >>

Re: BUG #4277: Feature request inet type cast numeric values

by heikki@[EMAIL PROTECTED] ("Heikki Linnakangas") Jul 1, 2008 at 06:53 PM

x wrote:
> 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';

You can create the cast yourself if you want to, see CREATE CAST.

-- 
   Heikki Lin****angas
   EnterpriseDB   http://www.enterprisedb.com

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
 




 3 Posts in Topic:
BUG #4277: Feature request inet type cast numeric values
noreply@[EMAIL PROTECTED]  2008-07-01 15:20:49 
Re: BUG #4277: Feature request inet type cast numeric values
heikki@[EMAIL PROTECTED]   2008-07-01 18:53:24 
Re: BUG #4277: Feature request inet type cast numeric values
tgl@[EMAIL PROTECTED] (T  2008-07-01 12:05:21 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 21:27:30 CDT 2008.