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 1gPX60-0002AD-F7 for pgsql-sql@arkaria.postgresql.org; Wed, 21 Nov 2018 18:19:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gPX5y-0007DM-9l for pgsql-sql@arkaria.postgresql.org; Wed, 21 Nov 2018 18:19:26 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gPX5x-0007D5-Vl; Wed, 21 Nov 2018 18:19:26 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gPX5u-0000vh-VZ; Wed, 21 Nov 2018 18:19:24 +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 wALIJKCb012250; Wed, 21 Nov 2018 13:19:20 -0500 From: Tom Lane To: "Voillequin, Jean-Marc" cc: Peter Eisentraut , pgsql-bugs@lists.postgresql.org, pgsql-sql@lists.postgresql.org Subject: Re: Weird "could not determine which collation to use for string comparison" with LEAST/GREATEST on PG11 procedure In-reply-to: <1EC8157EB499BF459A516ADCF135ADCE39FFAC54@LON-WGMSX712.ad.moodys.net> References: <1EC8157EB499BF459A516ADCF135ADCE39FFAC54@LON-WGMSX712.ad.moodys.net> Comments: In-reply-to "Voillequin, Jean-Marc" message dated "Wed, 21 Nov 2018 14:09:55 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12248.1542824360.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 21 Nov 2018 13:19:20 -0500 Message-ID: <12249.1542824360@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "Voillequin, Jean-Marc" writes: > SIMPLE=3D> create or replace procedure same_values_proc(a text, b text) = as $body$ > SIMPLE$> begin > SIMPLE$> assert a =3D b; > SIMPLE$> end;$body$ language plpgsql; > CREATE PROCEDURE > SIMPLE=3D> > SIMPLE=3D> call same_values_proc(least('a','b'),'a'); > ERROR: could not determine which collation to use for string comparison > HINT: Use the COLLATE clause to set the collation explicitly. Yeah, same here. I think somebody forgot to run assign_expr_collations() on CALL arguments. regards, tom lane