Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tWegj-000eDc-BL for pgsql-general@arkaria.postgresql.org; Sat, 11 Jan 2025 16:50:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tWegi-00Akbf-OL for pgsql-general@arkaria.postgresql.org; Sat, 11 Jan 2025 16:50:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tWegh-00AkVf-Fx for pgsql-general@lists.postgresql.org; Sat, 11 Jan 2025 16:50:16 +0000 Received: from fhigh-b7-smtp.messagingengine.com ([202.12.124.158]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tWegc-0016JL-27 for pgsql-general@lists.postgresql.org; Sat, 11 Jan 2025 16:50:14 +0000 Received: from phl-compute-09.internal (phl-compute-09.phl.internal [10.202.2.49]) by mailfhigh.stl.internal (Postfix) with ESMTP id 5CB6425400FF; Sat, 11 Jan 2025 11:50:08 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-09.internal (MEProxy); Sat, 11 Jan 2025 11:50:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1736614208; x=1736700608; bh=U+SrcGlor/cG/0tJ3Kyiyw43lCu5c+DqxsBrZ4Jlwgw=; b= WK0A6vVcC6SUqGf9FGY9GlqetiJdF93/kmhDEoiszhODIP/o7HFbwJnPkYtWMNHr qxlikHBxKd1rFGe30lYwyh6TNfC/HdMXzpfknAitx1BOj8m8Ywb/KBNd4v4WEv/R Ova9ZNDl+RAzL50rOKEqC3bpKJ8PxoajJbkEo79qrU9lszbTrgjq+Gzdxm6xENCF vvGprG+lshy8MSSnqA0vj8YWAGjm4w8YC95Lx76hkqcialDWgABHOHSoh39WZDae +xny4aKU6wpcwkiN1zTp1VDezYFZ5g8WrR+wKYjo8BFGozIOFCpy/g8lrjDBvphN jkMZsVd6T82Qmxp4UP/6ag== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1736614208; x= 1736700608; bh=U+SrcGlor/cG/0tJ3Kyiyw43lCu5c+DqxsBrZ4Jlwgw=; b=V tBUFVINBwzr+KGLpQL6xzchslOABiJfK0iDj85xx22CEX8yZZFuPo5TT5QjWoxZS MmeDNglxReG7AArO6zoATfoUXOyyehxjkDrP3HGU1s3GX+a9tMqMvWJta7noRTYv Dh+AglNeaPgOkp39wmcD0R5RKCrkORjGKi89J/GANqcd87kKkFVdKUGe4nqWlz59 M11KjJgYYoTqRQYqO2XVDrAYdpmVJGz64pVAmEGHx1eDWxRkBQjZhpXXHUGlQsh5 C8ew4GUohRB8Rvb+2gejRkC9Vndc9TWN9QInVJBa0f10eDJqV4CME7cRgusvQTqm gB9Rh8EYCFPHf5fUH6yiw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudehtddgleduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdej necuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrh esrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnheptdekhefgvdetgfehleev iedvjefhgeevfeetffdugefgjeeukeejjefhudeuffefnecuffhomhgrihhnpegtlhgvvh gvrhgvlhgvphhhrghnthdrtggrnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghm pehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh dpnhgspghrtghpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohephhgr rhhtmhgrnheitdhhohhmvgesghhmrghilhdrtghomhdprhgtphhtthhopegvfihivgesvg ifihgvrdhnrghmvgdprhgtphhtthhopehrohhnlhhjohhhnhhsohhnjhhrsehgmhgrihhl rdgtohhmpdhrtghpthhtohepphhgshhqlhdqghgvnhgvrhgrlheslhhishhtshdrphhosh htghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 11 Jan 2025 11:50:07 -0500 (EST) Message-ID: <9374c94f-95cc-4fa6-a997-a8fd7acdf379@aklaver.com> Date: Sat, 11 Jan 2025 08:50:06 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Display Bytea field To: Andy Hartman , Erik Wienhold Cc: Ron Johnson , "pgsql-generallists.postgresql.org" References: <10fe353b-a5ba-4522-badf-89119179b4f0@ewie.name> Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 1/11/25 03:05, Andy Hartman wrote: > I used PS to pull the data from mssql  to Postgres dumping data to csv. > I then used csv to load Postgres and the table that has Bytea What data type was used to store data in MySQL? Show command used to pull data from MySQL. > > # Convert the image data to a base64 string  -- powershell >     $base64Image = [Convert]::ToBase64String($row.ImageSource) > > AFter data was loaded the developer said in his app frontend that the > Image wouldn't open thru his code. -- I'm trying to get that code to > help debug > > He said the size of the array is 1368. from bytea The size coming from How does an array enter into this? > the SQL-Server db is 46935 and the image correctly appears... > > Could that be caused by my PS dump to csv process or maybe still a > code(frontend) issue.. > > Still trying to figure out using a single record if data loaded to the > bytea field matches the mssql record. > > I tried to use the tool SimplySql to connect mssql to postgresql to > transfer data but it failed  ... > > any help would be appreciated.. > > > > > > > > > > > On Fri, Jan 10, 2025 at 12:35 PM Erik Wienhold > wrote: > > On 2025-01-09 21:31 +0100, Andy Hartman wrote: > > could it be done using Powershell? > > I use this: https://blog.cleverelephant.ca/2021/04/psql-binary.html > > But I don't know if that translates to PowerShell. > > -- > Erik Wienhold > -- Adrian Klaver adrian.klaver@aklaver.com