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 1lFI8c-0006qe-KM for pgsql-general@arkaria.postgresql.org; Thu, 25 Feb 2021 15:01:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lFI8b-0001jB-JK for pgsql-general@arkaria.postgresql.org; Thu, 25 Feb 2021 15:01:09 +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 1lFI8b-0001j3-CN for pgsql-general@lists.postgresql.org; Thu, 25 Feb 2021 15:01:09 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lFI8Y-0001zP-TE for pgsql-general@lists.postgresql.org; Thu, 25 Feb 2021 15:01:08 +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 11PF14Yb107949; Thu, 25 Feb 2021 10:01:04 -0500 From: Tom Lane To: Yambu cc: Pavel Stehule , pgsql-general Subject: Re: converting text to bytea In-reply-to: References: Comments: In-reply-to Yambu message dated "Thu, 25 Feb 2021 13:31:29 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <107947.1614265264.1@sss.pgh.pa.us> Date: Thu, 25 Feb 2021 10:01:04 -0500 Message-ID: <107948.1614265264@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Yambu writes: > Is there a reason why i'm getting text when i run the below > select convert_to('some_text', 'UTF8') i get back 'some_text' You must have bytea_output set to "escape". regards, tom lane