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

BUG #6401: IS DISTINCT FROM improperly compares geomoetric datatypes

From: kenaniah(at)gmail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #6401: IS DISTINCT FROM improperly compares geomoetric datatypes
Date: 2012-01-18 21:14:12
Message-ID: E1Rncpg-00077z-S7@wrigleys.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged on the website:

Bug reference:      6401
Logged by:          Kenaniah Cerny
Email address:      kenaniah(at)gmail(dot)com
PostgreSQL version: 9.1.2
Operating system:   Centos 6 x86_64
Description:        

----
SELECT point(2, 3) IS DISTINCT FROM point(2, 3);
----
ERROR:  operator does not exist: point = point
LINE 1: SELECT point(2, 3) IS DISTINCT FROM point(2, 3)
                           ^
HINT:  No operator matches the given name and argument type(s). You might
need to add explicit type casts.
----

According to the docs
(http://www.postgresql.org/docs/current/static/functions-geometry.html#FUNCTIONS-GEOMETRY),
the "same as" operator is the ~= operator,  not the = operator. 

This problem cascades to the comparison of complex types, such as "OLD IS
DISTINCT FROM NEW" in the context of plpgsql. 


Responses

pgsql-bugs by date

Next:From: bricklenDate: 2012-01-18 23:39:01
Subject: Re: BUG #6400: function arguments not accepted
Previous:From: Bruce MomjianDate: 2012-01-18 14:49:34
Subject: Re: pg_upgrade v9.1 issues

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