Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ron <ronljohnsonjr@xxxxxxxxx> 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('1000000');

> Isn't '1000000' already a character string?

Nope; in the mind of the Postgres parser, it's a literal of unknown type,
with the actual type to be inferred from context.  There is a small
preference for resolving such a thing as being of text type, but only a
small one.  The rules are exactly the same as for an undecorated NULL
constant.

			regards, tom lane





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux