ABBAS SHAKEEL <shakeel.abbas.qau@gmail.com> writes:
> CREATE FUNCTION inet_to_bigint(inet) RETURNS bigint AS $$
> SELECT $1 - inet '0.0.0.0'
> $$ LANGUAGE SQL;
> Now above querry works fine for 8.3 but not for 8.1. I was wondering if
> there is some thing wrong from my side.
Per the 8.2 release notes:
* Add convenient arithmetic operations on INET/CIDR values (Stephen R. van den Berg)
The new operators are & (and), | (or), ~ (not), inet + int8, inet - int8, and inet - inet.
regards, tom lane