Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iEx4B-0003DT-JO for pgsql-general@arkaria.postgresql.org; Mon, 30 Sep 2019 14:54:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iEx4A-0007Nb-EM for pgsql-general@arkaria.postgresql.org; Mon, 30 Sep 2019 14:54:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iEx4A-0007NQ-3X for pgsql-general@lists.postgresql.org; Mon, 30 Sep 2019 14:54:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iEx47-0001XG-Uu for pgsql-general@postgresql.org; Mon, 30 Sep 2019 14:54:21 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x8UEsFom026284; Mon, 30 Sep 2019 10:54:15 -0400 From: Tom Lane To: Adrian Klaver cc: PegoraroF10 , pgsql-general@postgresql.org Subject: Re: Operator is not unique In-reply-to: <257b0805-ed19-6f64-ece8-112ae936dbff@aklaver.com> References: <1569334695687-0.post@n3.nabble.com> <4d4983d5-89a5-5e15-8b4f-a7d2184f0283@aklaver.com> <1569418730413-0.post@n3.nabble.com> <0b8eb296-178d-0e95-5fc7-0502d79ceaab@aklaver.com> <1569442463636-0.post@n3.nabble.com> <1569620660615-0.post@n3.nabble.com> <1569847690540-0.post@n3.nabble.com> <5f015007-4343-bf46-621a-e707b8206f5f@aklaver.com> <1569853731245-0.post@n3.nabble.com> <257b0805-ed19-6f64-ece8-112ae936dbff@aklaver.com> Comments: In-reply-to Adrian Klaver message dated "Mon, 30 Sep 2019 07:39:33 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <26282.1569855255.1@sss.pgh.pa.us> Date: Mon, 30 Sep 2019 10:54:15 -0400 Message-ID: <26283.1569855255@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Adrian Klaver writes: > The list of extensions that you sent earlier are fairly common. I would > not expect them to be contributing to the below otherwise there would > have been more reports of what you are seeing. A quick "grep" shows that there is nothing named "day_inc" in core Postgres nor any of the contrib extensions. So this is something homegrown. It looks to me like somebody wanted a plus operator that would add numerics and dates/timestamps/timestamptzs, and figured they could be lazy and make one operator using "anyelement". But this will capture numeric plus *anything*, so it was not a good idea. I'd recommend dropping the use of anyelement and just making three non-polymorphic operators. regards, tom lane