Re: Display Bytea field
Ron Johnson <ronljohnsonjr@gmail.com>
From: Ron Johnson <ronljohnsonjr@gmail.com>
To: Daniel Verite <daniel@manitou-mail.org>
Cc: Andy Hartman <hartman60home@gmail.com>, pgsql-general@lists.postgresql.org
Date: 2025-01-10T14:39:10Z
Lists: pgsql-general
On Fri, Jan 10, 2025 at 7:49 AM Daniel Verite <daniel@manitou-mail.org> wrote: [snip] > Alternatively, you could compare image checksums before and > after moving them into postgres. The advantage is that you > don't need to export or view any file, and you compare globally > all your images. If the checksums are identical, the data are identical. > On the MSSQL side, checksums can be computed with hashbytes() > as suggested in this stackoverflow answer: [3] > On the postgres side, use functions like md5() or sha256() > directly on the bytea column. > This is what I did when migrating Oracle xLOB columns to bytea. Had to use upper(md5()). I didn't suggest this earlier, since I don't know the details of MSSQL's Image data type. -- Death to <Redacted>, and butter sauce. Don't boil me, I'm still alive. <Redacted> lobster!