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 1k6E4q-00058M-QT for pgsql-general@arkaria.postgresql.org; Thu, 13 Aug 2020 14:19:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k6E4p-0003Rv-QA for pgsql-general@arkaria.postgresql.org; Thu, 13 Aug 2020 14:19:31 +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 1k6E4p-0003Rm-IC for pgsql-general@lists.postgresql.org; Thu, 13 Aug 2020 14:19:31 +0000 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1k6E4j-0007Iy-8i for pgsql-general@lists.postgresql.org; Thu, 13 Aug 2020 14:19:30 +0000 Received: by mail-pj1-x1043.google.com with SMTP id d4so2821098pjx.5 for ; Thu, 13 Aug 2020 07:19:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=y4pVTBPqIBZuBHKV/a6lOzYFC8QzDPBdxGCl0fBbM88=; b=mX3zcQ/je1Z356wEeif/Gi8tBc3F0rOov1FKKVskXYIwq3HAArJ57WOGb6ZM16Bkqi wtzeiRoqPSCRWL8XCeYiaHWFcNcGQwmgFloBfhKTRMwX2vsFtH1Jl0pynetkgkGqNGWv TdtDeehkFrBDksdCdzfX3jNhZKilI1dHMS2gDNyZ51Syl/N6wSoY2DV/bHlPJZFxz0G6 Z5a+cLGtleL1eRPgbD5ppOM8BQapyYySy1iUXhyYZoDZcq6hsiph2Xw5n1lDwGDSm2f2 dYFS18IKwFPEwrY/PO3dIWAaeHBbt34xz+7uapyVf8eUGLcehTreCTF1LdFMkz6dLwzy 6/6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=y4pVTBPqIBZuBHKV/a6lOzYFC8QzDPBdxGCl0fBbM88=; b=JpnmhHhQ5pyhDnGWCmwcBikVvCxlmRJw7sZoLGB9+K+u2I+YrNnO5WGAfmiE9e8Bf0 xEVAzcRbENNwI6VZBnQdh4CzOnq21WV4Z5KEy2u2qMaON05MvqB8r0j9mPCEDEb6hfAH mAKxYiPLH8j2BbtrZLeHKJTO831hsEe1/YTtbK44ZnHcP3yU9TJrOzpaGAVBilZKaQm1 1uHoveARAEi+UjSYWNtyAFvW/Q+s1zZYFWgKppIYjMHIkXFDZrP7DXOUi4zKRk0vYEsb NSyw0/6HrpnhW5WxMkiz6tZoZOcYlSjx1/tWS1HYSBr4SYSVHxMoulk1c3HLkYR4O2ke HCMA== X-Gm-Message-State: AOAM5329OS1Nq6Lr1lrmMOJY7WUpvN8xw6fC65AgGZeVzBlpYuWi95A9 FbUc9rtH1M+zuV2HZsUGW349Q5MVmMCo5HuP/YVs4SY7 X-Google-Smtp-Source: ABdhPJzXq8NKeYEzB6PMLEL8az3KHzEVU3/XrbdmXjKec4BFnwoM438YKvje2hQ+gf7qjGYnO74mkmSOuiaPbWRQp+8= X-Received: by 2002:a17:90a:a50d:: with SMTP id a13mr5360490pjq.180.1597328363967; Thu, 13 Aug 2020 07:19:23 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:90a:6489:0:0:0:0 with HTTP; Thu, 13 Aug 2020 07:19:22 -0700 (PDT) In-Reply-To: References: From: "David G. Johnston" Date: Thu, 13 Aug 2020 07:19:22 -0700 Message-ID: Subject: Re: Bytea Example To: Naveen Kumar Cc: "pgsql-general@lists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000b9584405acc2fd14" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000b9584405acc2fd14 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thursday, August 13, 2020, Naveen Kumar wrote: > Can someone please give me an example on byteA data type. > > 1. How to import a image/text file into Bytea data type.? > 2. How to export the same? > At a simple level its no different than importing and exporting character data using a =E2=80=9Ctext/varchar=E2=80=9D field or a number using an inte= ger field. For bytea the content is just raw bytes instead of characters or numbers. David J. --000000000000b9584405acc2fd14 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thursday, August 13, 2020, Naveen Kumar <naveenmcp@gmail.com> wrote:
Can someone please give me an example on byteA data t= ype.

1. How to import a image/text file into Bytea data = type.?
2. How to export the same?
At a simple level its no different than importing and exportin= g character data using a =E2=80=9Ctext/varchar=E2=80=9D field or a number u= sing an integer field.=C2=A0 For bytea the content is just raw bytes instea= d of characters or numbers.

David J.

--000000000000b9584405acc2fd14--