Re: Display Bytea field

From: Andy Hartman <hartman60home(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: Erik Wienhold <ewie(at)ewie(dot)name>, Ron Johnson <ronljohnsonjr(at)gmail(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Display Bytea field
Date: 2025-01-11 23:49:06
Message-ID: CAEZv3cpMxZLUKV_Nm9qw-dBohuThC5co-5-p_OPD5Lnf8kxrgA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I still have csv files and loaded right into PG no decoding and look like
this little snippet and I did the COpy command into PG

"/9j/4AAQSkZJRgABAQAAAQABAAD

On Sat, Jan 11, 2025 at 11:50 AM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:

> 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 <ewie(at)ewie(dot)name
> > <mailto:ewie(at)ewie(dot)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
> > <https://blog.cleverelephant.ca/2021/04/psql-binary.html>
> > But I don't know if that translates to PowerShell.
> >
> > --
> > Erik Wienhold
> >
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Johnson 2025-01-12 00:03:28 Re: Display Bytea field
Previous Message Adrian Klaver 2025-01-11 16:50:06 Re: Display Bytea field