Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qHNIG-0002XI-5Q for pgsql-general@arkaria.postgresql.org; Thu, 06 Jul 2023 11:37:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qHNIF-0006ue-2F for pgsql-general@arkaria.postgresql.org; Thu, 06 Jul 2023 11:37:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qHNIE-0006uU-MF for pgsql-general@lists.postgresql.org; Thu, 06 Jul 2023 11:37:02 +0000 Received: from mout-u-107.mailbox.org ([2001:67c:2050:101:465::107]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qHNI7-002Wc9-6N for pgsql-general@lists.postgresql.org; Thu, 06 Jul 2023 11:37:01 +0000 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-107.mailbox.org (Postfix) with ESMTPS id 4QxZHj3km1z9sld; Thu, 6 Jul 2023 13:36:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ewie.name; s=MBO0001; t=1688643409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IRYg1KPhDSDZ6jfZhupuEemS6lXYRHWyseJQXF274lY=; b=IiWzcf2ay2zQvkqRYh1qv9dNbS1vipEMaId4VmRAWi7P3zg/QF+ZS4hrB2J8pmEAZkIvIA USBMlzHvzhdQrGXc8lJp+ycrXulVCQFjKxQApOK/iJ4XrDNqA4eZKu//FvfXxI/kSbNjcY XIRMH3UKv3WAsFzpOLXL8IMelAq4mCUWgSPvpZWEAq2hDJLvVwy2m9Ny2+WFfUttwcw4w4 5iofOupJFEFqB0mCdIB+e94QiFYrJie5kjOcNv+XQuu4L3tn244cHk4jQ8m1uAXJ2F9WMN 2QMn/NgeS07XDZzH7mZFqFiecx+V02jRIjGvTCiKe3Ln4cLnhrlTNRxR1wPI4Q== Date: Thu, 6 Jul 2023 13:36:49 +0200 (CEST) From: Erik Wienhold To: gzh , pgsql-general@lists.postgresql.org Message-ID: <269723997.937486.1688643409072@office.mailbox.org> In-Reply-To: <2f8f581c.67f1.1892a7fba60.Coremail.gzhcoder@126.com> References: <2f8f581c.67f1.1892a7fba60.Coremail.gzhcoder@126.com> Subject: Re: function to_char(unknown) is not unique at character 8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Priority: 3 Importance: Normal List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 06/07/2023 11:19 CEST gzh wrote: > > I upgraded the version of PostgreSQL from 12.6 to 12.13, > when I execute the sql below , the to_char function caused the following = error. > > ---------------SQL------------------ > select TO_CHAR('1000000'); > > ERROR: function to_char(unknown) is not unique at character 8 > HINT: Could not choose a best candidate function. You might need to add e= xplicit type casts. > > There is no problem before the upgrade and to_char function comes from th= e > Orafce extension. > The configuration of the old and new databases is as follows. > > Database server (old): PostgreSQL 12.6=EF=BC=88orafce3.13=EF=BC=89 > Database server (new): PostgreSQL 12.13=EF=BC=88orafce3.24=EF=BC=89 > > The new database has successfully installed the orafce 3.24 extension. > It does not occur in "PostgreSQL 12.6 and orafce 3.13", > but occurs in "PostgreSQL 12.13 and orafce 3.24", > so either the difference between 12.6 and 12.13 or the difference between > orafce 3.13 and 3.24 is suspicious. > > What is the reason for the problem and how to fix the error? This rings a bell: https://www.postgresql.org/message-id/1597875806.606392.1681915893771%40off= ice.mailbox.org Either qualify functions with namespace oracle, e.g. oracle.to_char('100000= 0'), or place oracle on the search path. -- Erik