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 1pp99s-00036J-S9 for pgsql-general@arkaria.postgresql.org; Wed, 19 Apr 2023 14:51:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pp99r-0004wh-H5 for pgsql-general@arkaria.postgresql.org; Wed, 19 Apr 2023 14:51:43 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pp99r-0004wY-6D for pgsql-general@lists.postgresql.org; Wed, 19 Apr 2023 14:51:43 +0000 Received: from mout-u-107.mailbox.org ([2001:67c:2050:101:465::107]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pp99o-000hhZ-IL for pgsql-general@lists.postgresql.org; Wed, 19 Apr 2023 14:51:41 +0000 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::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 4Q1kJQ3Xjsz9sNn; Wed, 19 Apr 2023 16:51:34 +0200 (CEST) Date: Wed, 19 Apr 2023 16:51:33 +0200 (CEST) From: Erik Wienhold To: gzh , pgsql-general@lists.postgresql.org Message-ID: <1597875806.606392.1681915893771@office.mailbox.org> In-Reply-To: <328d2a0.828a.18799afd0ac.Coremail.gzhcoder@126.com> References: <328d2a0.828a.18799afd0ac.Coremail.gzhcoder@126.com> Subject: Re: psql:t_mstr.sql:994: ERROR: function to_char(numeric) does not exist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Priority: 3 Importance: Normal X-Rspamd-Queue-Id: 4Q1kJQ3Xjsz9sNn List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 19/04/2023 15:24 CEST gzh wrote: > > Hi, > > I upgraded the version of PostgreSQL from 12.10 to 12.13, Better upgrade to latest release 12.14. > when I insert data into the t_mstr table, the to_char function in the t_m= str's > trigger caused the following error. > > psql:t_mstr.sql:994: ERROR: function to_char(numeric) does not exist > > There is no problem before the upgrade and to_char(numeric) function come= s > from the Orafce extension. > The configuration of the old and new databases is as follows. > > Database server (old): PostgreSQL 12.10=EF=BC=88orafce3.15=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.10 and orafce 3.15", > but occurs in "PostgreSQL 12.13 and orafce 3.24", > so either the difference between 12.10 and 12.13 or the difference betwee= n > orafce 3.15 and 3.24 is suspicious. > > What is the reason for the problem? orafce 3.22 moved functions to schema oracle: https://github.com/orafce/orafce/blob/b492a0f50d5ee866c9870f886401d7c34ad8c= cb3/NEWS#L4,L5 https://github.com/orafce/orafce/commit/86a1b51440ca33a04ef47fc3bb704dee26d= 16753 -- Erik