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 1ps2LW-0002zK-Ll for pgsql-general@arkaria.postgresql.org; Thu, 27 Apr 2023 14:11:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ps2LV-00010z-JJ for pgsql-general@arkaria.postgresql.org; Thu, 27 Apr 2023 14:11:41 +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 1ps2LV-00010p-8Z for pgsql-general@lists.postgresql.org; Thu, 27 Apr 2023 14:11:41 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ps2LS-005OKH-C9 for pgsql-general@lists.postgresql.org; Thu, 27 Apr 2023 14:11:40 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 33REBMaA1109903; Thu, 27 Apr 2023 10:11:23 -0400 From: Tom Lane To: gzh cc: "Erik Wienhold" , pgsql-general@lists.postgresql.org Subject: Re: psql:t_mstr.sql:994: ERROR: function to_char(numeric) does not exist In-reply-to: <7480a292.7dc7.187c271a743.Coremail.gzhcoder@126.com> References: <328d2a0.828a.18799afd0ac.Coremail.gzhcoder@126.com> <1597875806.606392.1681915893771@office.mailbox.org> <70c95d95.7a58.1879a77ed4f.Coremail.gzhcoder@126.com> <2993958.1681924695@sss.pgh.pa.us> <5027d9b9.7aad.187b831fb18.Coremail.gzhcoder@126.com> <1073908593.624606.1682427189969@office.mailbox.org> <7480a292.7dc7.187c271a743.Coremail.gzhcoder@126.com> Comments: In-reply-to gzh message dated "Thu, 27 Apr 2023 19:20:41 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1109901.1682604682.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 27 Apr 2023 10:11:22 -0400 Message-ID: <1109902.1682604682@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk gzh writes: > I did the following two tests and found that the return value of pg_cata= log.date and oracle.date are inconsistent. Yeah ... that's pretty much the point. Oracle uses the name "date" for a data type that Postgres (and the SQL standard) calls a "timestamp". That's very ancient on their side and I doubt they'll ever change it. If you're porting a bunch of code written for Oracle to Postgres, you'd have to run around and change every occurrence of "date" to "timestamp" ... unless you install orafce, in which case you can rely on this alias type that orafce creates. But you do then have two types named "date" in the system, so you have to be careful about search_path settings or you'll get more confusion than it's worth. regards, tom lane