Re: Display Bytea field - Mailing list pgsql-general

From Andy Hartman
Subject Re: Display Bytea field
Date
Msg-id CAEZv3cqQ-LRPLM8iMsKh_Wc023pdHiW34AeuuY9jH-OF8FUnqg@mail.gmail.com
Whole thread Raw
In response to Display Bytea field  (Andy Hartman <hartman60home@gmail.com>)
Responses Re: Display Bytea field
Re: Display Bytea field
List pgsql-general
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

# 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 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 <ewie@ewie.name> 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

pgsql-general by date:

Previous
From: Vladlen Popolitov
Date:
Subject: Re: Postgres do not support tinyint?
Next
From: Ron Johnson
Date:
Subject: Re: Display Bytea field