Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 5A19943CEB8 for ; Thu, 19 Jan 2012 09:31:07 -0400 (AST) Received: from 30.55.colo.spiretech.net ([69.168.55.30] helo=lists.commandprompt.com) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Rns50-0005oI-OE for pgsql-bugs@postgresql.org; Thu, 19 Jan 2012 13:31:06 +0000 Received: from perhan.alvh.no-ip.org (spinlock.commandprompt.com [69.168.55.30]) by lists.commandprompt.com (Postfix) with ESMTPA id 93F6721C; Thu, 19 Jan 2012 05:31:10 -0800 (PST) Received: from perhan.alvh.no-ip.org ([190.95.26.35] helo=perhan.alvh.no-ip.org) by assp.commandprompt.com with ESMTPS(AES256-SHA) (2.1.1); 19 Jan 2012 05:31:08 -0800 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id AED136E504; Thu, 19 Jan 2012 10:30:44 -0300 (CLST) Content-Type: text/plain; charset=UTF-8 Cc: kenaniah , Pg Bugs Subject: Re: BUG #6401: IS DISTINCT FROM improperly compares geomoetric datatypes From: Alvaro Herrera To: Heikki Linnakangas In-reply-to: <4F17EFA0.6050903@enterprisedb.com> References: <4F17EFA0.6050903@enterprisedb.com> Date: Thu, 19 Jan 2012 10:30:44 -0300 Message-Id: <1326979145-sup-7356@alvh.no-ip.org> User-Agent: Sup/git X-Assp-Version: 2.1.1(11278) on assp.commandprompt.com X-Assp-Client-TLS: yes X-Assp-ID: assp.commandprompt.com m1-79870-08744 X-Assp-Envelope-From: alvherre@alvh.no-ip.org X-Assp-Intended-For: heikki.linnakangas@enterprisedb.com X-Assp-Original-Subject: Re: [BUGS] BUG #6401: IS DISTINCT FROM improperly compares geomoetric datatypes Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201201/136 X-Sequence-Number: 32203 Excerpts from Heikki Linnakangas's message of jue ene 19 07:25:36 -0300 2= 012: > Frankly that's such a rare corner case that I'm not very enthusiastic=20 > about fixing it. One idea would be to look up the type's b-tree sort=20 > operators, and pick the equality operator from there. But point datatyp= e=20 > doesn't have b-tree sort operators, either, so it wouldn't help in this= =20 > case. It doesn't have a hash opclass either, which could be used as a fallback in case there's no btree. Point cannot obviously have a btree opclass (no inequalities), but a hash one seems possible. I think the use case of IS NOT DISTINCT FROM for rowtypes in triggers is a valid one. --=20 =C3=81lvaro Herrera The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support