Re: function to_char(unknown) is not unique at character 8

2023-07-06 Thread gzh
Thank you for the solution you provided to identify these useless usage of this function,I learned a lot from it. At 2023-07-06 22:42:38, "Pavel Stehule" wrote: čt 6. 7. 2023 v 16:28 odesílatel gzh napsal: Thank you for the solution, it works fine. > I have a question.

Re: function to_char(unknown) is not unique at character 8

2023-07-06 Thread Pavel Stehule
čt 6. 7. 2023 v 16:28 odesílatel gzh napsal: > Thank you for the solution, it works fine. > > > > I have a question. Why do you use the to_char(string) function? Instead > to_char('text') you can write only 'text'. > I'm guessing it's probably a bug made by the original developer, > but I'm not s

Re: function to_char(unknown) is not unique at character 8

2023-07-06 Thread gzh
Thank you for the solution, it works fine. > I have a question. Why do you use the to_char(string) function? Instead > to_char('text') you can write only 'text'. I'm guessing it's probably a bug made by the original developer, but I'm not sure how many bugs there are, because it works fine in

Re: function to_char(unknown) is not unique at character 8

2023-07-06 Thread Pavel Stehule
čt 6. 7. 2023 v 16:16 odesílatel gzh napsal: > Thank you very much for taking the time to reply to my question. > I added oracle to search_path, but it didn't work. > > postgres=# show search_path; > search_path > - > "$user", public, oracle, pg_c

Re: function to_char(unknown) is not unique at character 8

2023-07-06 Thread gzh
Thank you very much for taking the time to reply to my question. I added oracle to search_path, but it didn't work. postgres=# show search_path; search_path - "$user", public, oracle, pg_catalog At 2023-07-06 19:36:49, "Erik Wi

Re: function to_char(unknown) is not unique at character 8

2023-07-06 Thread Tom Lane
Ron writes: > On 7/6/23 04:19, gzh wrote: >> when I execute the sql below , the to_char function caused the following >> error. >> select TO_CHAR('100'); > Isn't '100' already a character string? Nope; in the mind of the Postgres parser, it's a literal of unknown type, with the actual t

Re: function to_char(unknown) is not unique at character 8

2023-07-06 Thread Ron
On 7/6/23 04:19, gzh wrote: Hi, 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('100'); Isn't '100' already a character string? How do

Re: function to_char(unknown) is not unique at character 8

2023-07-06 Thread Pavel Stehule
čt 6. 7. 2023 v 13:38 odesílatel gzh napsal: > Thank you very much for taking the time to reply to my question. > There are a lot of TO_CHAR in my application, and there is a high cost of > modifying the code, > is there another solution to solve the problem without modifying the code? > There i

Re: function to_char(unknown) is not unique at character 8

2023-07-06 Thread gzh
Thank you very much for taking the time to reply to my question. There are a lot of TO_CHAR in my application, and there is a high cost of modifying the code, is there another solution to solve the problem without modifying the code? At 2023-07-06 19:21:24, "Pavel Stehule" wrote: Hi

Re: function to_char(unknown) is not unique at character 8

2023-07-06 Thread Erik Wienhold
> 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('100'); > > ERROR: function to_char(unknown) is not

Re: function to_char(unknown) is not unique at character 8

2023-07-06 Thread Pavel Stehule
Hi čt 6. 7. 2023 v 11:19 odesílatel gzh napsal: > Hi, > > > 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('100'); > > > ERROR: funct