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 1qHPZN-0000vo-Jl for pgsql-general@arkaria.postgresql.org; Thu, 06 Jul 2023 14:02:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qHPYN-0007OF-SV for pgsql-general@arkaria.postgresql.org; Thu, 06 Jul 2023 14:01:51 +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 1qHPYN-0007O6-HE for pgsql-general@lists.postgresql.org; Thu, 06 Jul 2023 14:01:51 +0000 Received: from mail-yb1-xb2d.google.com ([2607:f8b0:4864:20::b2d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qHPYH-002Mf8-01 for pgsql-general@lists.postgresql.org; Thu, 06 Jul 2023 14:01:50 +0000 Received: by mail-yb1-xb2d.google.com with SMTP id 3f1490d57ef6-c5079a9f1c8so761126276.0 for ; Thu, 06 Jul 2023 07:01:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688652104; x=1691244104; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=vqWX8sDFaS+auRjwRSGF+mGrv2VSRFbvk6PwR5Wqv5M=; b=N3Ehf0ii5Er5SvfRqwvmM25+OEvKH1HSHrY9JGMbyclQa7dgoQNuP8SZXvpBoRu7bL fi83oYdHf0dj63NyK5M2lyxrwQC4gTYV/3GVWLoo+5bza9L4xtotVnGvrxs1U325aIcE LNydOgLGoZYWUVsb0YFZ6zg0WJYooyPyzvS1s126Z5KG1MmoYli/J36kM3aD8Tnyt8Ni MqxIkyzuzpQ/KYH0kFD9kFIivPXPekYK/l8AwAfRzDiWDFMCRUdrlU80CMmShgtJBW+g rbBfGQzmPxCFkzz1+PlavmBTvMsUPScIx+jl3W8KefazDK62EmQ1Qo9eRIISp9DZbg5T sZGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688652104; x=1691244104; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=vqWX8sDFaS+auRjwRSGF+mGrv2VSRFbvk6PwR5Wqv5M=; b=bdbUl3ThfhUoNx2zjcLvL26jpJO4waphkVexs3yH7AEcsPpDq3+1EhqhmpsI7hNSJQ 75SkpbFGV1FxKneiUuvsEadFqmXdDDqbaYrrSNqW4mp5WxYEsW0aUMWFrf6ZZhsobKDh OSnOs/U/72YBN5zwoEaiubQME5fqPv6dsbCk7oNHU27NwkD0iCJKIraRYgvFlACKQoTp mGx3Fdc2XBYgotZJRjJ1X1lag9CD8PcHBm/rUmo4VLqouiiEysD3W1GduW0IUE3vxOUj /gDe6slQUfirnwGyzv2C/+3ZJYAvWOjSPOFcRn3HM0/0agT/u56Cbd6nc8LfvcUsmN+V OdcQ== X-Gm-Message-State: ABy/qLZNyqIezEq8M/0wqLC7y80EPclrjDd91AefqoSdzfAoEdgbltRH QWndu2vCWRsRHAjcguGk9KNWYXnMXWw= X-Google-Smtp-Source: APBJJlFobdv8gzpWnJ3G4Vn/sgfTZiGb9NrDgOfJSqN7baFUdYekack0cnodCnCX9CqT1plhTsdfhg== X-Received: by 2002:a25:cec4:0:b0:c69:cf6c:72f0 with SMTP id x187-20020a25cec4000000b00c69cf6c72f0mr945166ybe.8.1688652103717; Thu, 06 Jul 2023 07:01:43 -0700 (PDT) Received: from ?IPV6:2600:1700:bd2c:b810:5dc9:ed67:de4:7330? ([2600:1700:bd2c:b810:5dc9:ed67:de4:7330]) by smtp.googlemail.com with ESMTPSA id g18-20020a258a12000000b00c4eec81ac9esm331451ybl.11.2023.07.06.07.01.43 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 06 Jul 2023 07:01:43 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------mxkyn0AhlQUljiN4Nnl0ApsH" Message-ID: <937cdcff-5ecd-afdf-8b86-64c0c6c982fa@gmail.com> Date: Thu, 6 Jul 2023 09:01:43 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: function to_char(unknown) is not unique at character 8 Content-Language: en-US To: pgsql-general@lists.postgresql.org References: <2f8f581c.67f1.1892a7fba60.Coremail.gzhcoder@126.com> From: Ron In-Reply-To: <2f8f581c.67f1.1892a7fba60.Coremail.gzhcoder@126.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------mxkyn0AhlQUljiN4Nnl0ApsH Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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('1000000'); > Isn't '1000000' already a character string? How do you convert a character string to a character string? -- Born in Arizona, moved to Babylonia. --------------mxkyn0AhlQUljiN4Nnl0ApsH Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit 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('1000000');


Isn't '1000000' already a character string?

How do you convert a character string to a character string?

--
Born in Arizona, moved to Babylonia.
--------------mxkyn0AhlQUljiN4Nnl0ApsH--