pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedinet Operator Does not exists
2+ messages / 2 participants
[nested] [flat]
* inet Operator Does not exists
@ 2010-05-08 18:56 ABBAS SHAKEEL <shakeel.abbas.qau@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: ABBAS SHAKEEL @ 2010-05-08 18:56 UTC (permalink / raw)
To: pgsql-admin
Hello Team,
I am facing an issue with inet .
Locally i am using postgresql 8.3 and for remote server i am using 8.1
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.
Below is the error message
ERROR: operator does not exist: inet - inet
HINT: No operator matches the given name and argument type(s). You
may need to add explicit type casts.
CONTEXT: SQL function "inet_to_bigint"
--
Best Regards
Shakeel Abbas
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: inet Operator Does not exists
@ 2010-05-09 00:44 Tom Lane <tgl@sss.pgh.pa.us>
parent: ABBAS SHAKEEL <shakeel.abbas.qau@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2010-05-09 00:44 UTC (permalink / raw)
To: ABBAS SHAKEEL <shakeel.abbas.qau@gmail.com>; +Cc: pgsql-admin
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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2010-05-09 00:44 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-05-08 18:56 inet Operator Does not exists ABBAS SHAKEEL <shakeel.abbas.qau@gmail.com>
2010-05-09 00:44 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox