Re: psql:t_mstr.sql:994: ERROR: function to_char(numeric) does not exist

2023-04-27 Thread gzh
>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"

Re: psql:t_mstr.sql:994: ERROR: function to_char(numeric) does not exist

2023-04-27 Thread Tom Lane
gzh writes: > I did the following two tests and found that the return value of > pg_catalog.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

Re: Re:Re: psql:t_mstr.sql:994: ERROR: function to_char(numeric) does not exist

2023-04-27 Thread Erik Wienhold
> On 27/04/2023 13:20 CEST gzh wrote: > > When the return type is set to oracle.date, there are hours, minutes, and > seconds of the date value in the SQL execution result. > Why is there such a difference and how to solve it? orafce defines oracle.date as timestamp(0) [0] because Oracle's DATE

Re:Re: psql:t_mstr.sql:994: ERROR: function to_char(numeric) does not exist

2023-04-27 Thread gzh
Thank you very much for your reply. I did the following two tests and found that the return value of pg_catalog.date and oracle.date are inconsistent. â‘ the function was created with return type pg_catalog.date --- CREATE OR REPLACE FUNCTION to_date(str text) RETURNS pg_catalog.date AS

Re: psql:t_mstr.sql:994: ERROR: function to_char(numeric) does not exist

2023-04-25 Thread Erik Wienhold
> On 25/04/2023 13:34 CEST gzh wrote: > > >The solution is the same whether you upgrade or not: you need > >to adjust your search_path to include the "oracle" schema, > >or else explicitly qualify references to orafce functions. > Thank you very much for your help. > > To use the to_date

Re: psql:t_mstr.sql:994: ERROR: function to_char(numeric) does not exist

2023-04-25 Thread gzh
>The solution is the same whether you upgrade or not: you need >to adjust your search_path to include the "oracle" schema, >or else explicitly qualify references to orafce functions.Thank you very much >for your help. To use the to_date functions of Orafce 3.0.1, we created the following

Re: psql:t_mstr.sql:994: ERROR: function to_char(numeric) does not exist

2023-04-19 Thread Adrian Klaver
On 4/19/23 10:02 AM, gzh wrote: Thank you for your prompt reply. Is there another solution if the database is not upgraded to 12.14? Better upgrade to latest release 12.14. The point being made was that 12.14 is the latest minor release so you might as well upgrade to it. It will not

Re: psql:t_mstr.sql:994: ERROR: function to_char(numeric) does not exist

2023-04-19 Thread Tom Lane
gzh writes: > Thank you for your prompt reply. > Is there another solution if the database is not upgraded to 12.14? The solution is the same whether you upgrade or not: you need to adjust your search_path to include the "oracle" schema, or else explicitly qualify references to orafce

Re: psql:t_mstr.sql:994: ERROR: function to_char(numeric) does not exist

2023-04-19 Thread gzh
i, >> >> 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_mstr's >> trigger caused the following error. >> >> psql:t_mstr.

Re: psql:t_mstr.sql:994: ERROR: function to_char(numeric) does not exist

2023-04-19 Thread Erik Wienhold
t; > 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 comes > from the Orafce extension. > The configuration of the old and new databases is as follows. > > Database server (old): Postgr

psql:t_mstr.sql:994: ERROR: function to_char(numeric) does not exist

2023-04-19 Thread gzh
Hi, I upgraded the version of PostgreSQL from 12.10 to 12.13, when I insert data into the t_mstr table, the to_char function in the t_mstr's trigger caused the following error. psql:t_mstr.sql:994: ERROR: function to_char(numeric) does not exist There is no problem before